/* ------------------------------------------------------------------ tokens */
:root {
  --accent: #f2545b;
  --accent-hover: #e03e46;
  --accent-soft: #fde8e9;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-raised: #ffffff;
  --text: #222222;
  --muted: #6b6b76;
  --faint: #9a9aa5;
  --border: #e0e0e6;
  --border-strong: #c9c9d2;
  --link: #d63e46;
  --ok: #2e9e5b;
  --warn: #d9900b;
  --info: #3b7dd8;
  --sale: #3fa34d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
  --radius: 6px;
  --header-h: 56px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --accent: #ff6b72;
    --accent-hover: #ff8a90;
    --accent-soft: #3a1e22;
    --bg: #17171c;
    --bg-alt: #1f1f26;
    --bg-raised: #23232b;
    --text: #e9e9ef;
    --muted: #a3a3b0;
    --faint: #73737f;
    --border: #33333d;
    --border-strong: #464652;
    --link: #ff8a90;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --accent: #ff6b72;
  --accent-hover: #ff8a90;
  --accent-soft: #3a1e22;
  --bg: #17171c;
  --bg-alt: #1f1f26;
  --bg-raised: #23232b;
  --text: #e9e9ef;
  --muted: #a3a3b0;
  --faint: #73737f;
  --border: #33333d;
  --border-strong: #464652;
  --link: #ff8a90;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--bg-alt); padding: 12px 14px; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main#app { flex: 1; width: 100%; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.page { padding: 28px 0 48px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--bg-alt); }
.btn.danger { color: #c62828; border-color: #e7b3b3; }
.btn.danger:hover { background: #c62828; color: #fff; border-color: #c62828; }
.btn.small { padding: 6px 10px; font-size: 0.82rem; }
.btn.large { padding: 14px 22px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------------- forms */
label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 5px; font-weight: 400; }
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='url'],
input[type='search'], input[type='datetime-local'], input[type='date'], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 0.88rem; min-height: 280px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type='color'] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; margin: 0; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.radio-card { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 12px; cursor: pointer; font-weight: 400; margin: 0; }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.radio-card strong { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.radio-card input { accent-color: var(--accent); }
.radio-card span { font-size: 0.83rem; color: var(--muted); }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: flex; align-items: center; padding: 0 10px; background: var(--bg-alt); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.input-prefix > input { border-radius: 0 var(--radius) var(--radius) 0; }
.form-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2c0; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
.site-header .inner { height: 100%; display: flex; align-items: center; gap: 18px; max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none !important; flex-shrink: 0; }
.logo svg { width: 30px; height: 30px; }
.logo .tld { color: var(--accent); }
.main-nav { display: flex; gap: 2px; }
.main-nav a { color: var(--muted); font-weight: 700; font-size: 0.9rem; padding: 8px 10px; border-radius: var(--radius); text-decoration: none; }
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--bg-alt); }
.header-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.header-search input { padding: 8px 12px 8px 34px; background: var(--bg-alt); border-color: transparent; border-radius: 20px; }
.header-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.header-user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: var(--radius); color: var(--text); font: inherit; font-weight: 700; }
.user-menu > button:hover { background: var(--bg-alt); }
.avatar { width: 32px; height: 32px; border-radius: 4px; image-rendering: pixelated; background: var(--bg-alt); object-fit: cover; flex-shrink: 0; }
.avatar.lg { width: 96px; height: 96px; border-radius: 8px; }
.avatar.sm { width: 24px; height: 24px; }
.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 210px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 4px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-alt); }
.dropdown hr { margin: 6px 0; }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 980px) {
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg-raised); border-bottom: 1px solid var(--border); flex-direction: column; padding: 8px 16px 14px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .menu-toggle { display: block; }
}
@media (max-width: 640px) {
  .header-search { display: none; }
  .header-user .btn.hide-sm { display: none; }
  .user-menu .name { display: none; }
}

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); color: var(--muted); font-size: 0.85rem; padding: 28px 0; margin-top: 40px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--muted); }

/* -------------------------------------------------------------- game grid */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 20px; }
.game-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px 16px; }
.game-cell { min-width: 0; position: relative; }
.game-cell .thumb { position: relative; display: block; aspect-ratio: 315 / 250; border-radius: 4px; overflow: hidden; background: var(--bg-alt); box-shadow: 0 0 0 1px var(--border); }
.game-cell .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; image-rendering: auto; }
.game-cell:hover .thumb img { transform: scale(1.03); }
.game-cell .title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 8px; }
.game-cell .title { font-weight: 800; color: var(--text); font-size: 0.98rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-cell .short { color: var(--muted); font-size: 0.85rem; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-cell .author { font-size: 0.83rem; color: var(--faint); }
.game-cell .author a { color: var(--muted); }
.game-cell .meta { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; font-size: 0.78rem; color: var(--faint); }
.price-tag { flex-shrink: 0; font-size: 0.75rem; font-weight: 800; padding: 3px 6px; border-radius: 3px; background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); line-height: 1.2; white-space: nowrap; }
.price-tag.sale { background: var(--sale); border-color: var(--sale); color: #fff; }
.price-tag .was { text-decoration: line-through; opacity: 0.75; font-weight: 600; margin-right: 3px; }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 3px; background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.web { background: #2f80ed; color: #fff; border-color: #2f80ed; }
.badge.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.badge.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.badge.warn { background: var(--warn); color: #fff; border-color: var(--warn); }
.badge.info { background: var(--info); color: #fff; border-color: var(--info); }
.thumb .badge { position: absolute; top: 8px; left: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.platform-icons { display: inline-flex; gap: 4px; align-items: center; }
.platform-icons svg { width: 14px; height: 14px; fill: currentColor; }
.stars { display: inline-flex; align-items: center; gap: 1px; color: #f5b400; line-height: 1; }
.stars svg { width: 14px; height: 14px; }
.stars .count { color: var(--faint); margin-left: 4px; font-size: 0.8rem; }
.stars.lg svg { width: 22px; height: 22px; }
.star-input { display: inline-flex; gap: 2px; }
.star-input button { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--border-strong); line-height: 0; }
.star-input button svg { width: 24px; height: 24px; }
.star-input button.on, .star-input:hover button { color: #f5b400; }
.star-input button:hover ~ button { color: var(--border-strong); }
.star-input.sm button svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------- sections */
.section { margin: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.section-head h2 { margin: 0; font-size: 1.2rem; }
.section-head a { font-size: 0.88rem; font-weight: 700; }

.hero {
  background: linear-gradient(120deg, #2b0f54, #ab1f65 55%, #ff4f69);
  color: #fff;
  padding: 44px 0;
  position: relative;
  overflow: hidden;
}
.hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.hero h1 { font-size: 2.3rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.hero p { font-size: 1.1rem; opacity: 0.92; max-width: 560px; }
.hero .btn { border-color: #fff; }
.hero .btn.primary { background: #fff; color: #ab1f65; }
.hero .btn.primary:hover { background: #ffe6ec; }
.hero .btn:not(.primary) { background: transparent; color: #fff; }
.hero .stat { font-size: 0.9rem; opacity: 0.85; margin-top: 12px; }

.featured-strip { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.featured-strip .feature { position: relative; border-radius: var(--radius); overflow: hidden; display: block; color: #fff; text-decoration: none !important; min-height: 160px; background: #222; }
.featured-strip .feature:first-child { grid-row: span 2; }
.featured-strip .feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.featured-strip .feature:hover img { transform: scale(1.04); }
.featured-strip .feature .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); }
.featured-strip .feature .cap strong { display: block; font-size: 1.05rem; }
.featured-strip .feature:first-child .cap strong { font-size: 1.5rem; }
.featured-strip .feature .cap span { font-size: 0.82rem; opacity: 0.85; }
@media (max-width: 760px) {
  .featured-strip { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .featured-strip .feature:first-child { grid-column: span 2; grid-row: auto; min-height: 220px; }
}

.home-cols { display: grid; grid-template-columns: 1fr 320px; gap: 36px; }
@media (max-width: 960px) { .home-cols { grid-template-columns: 1fr; } }
.side-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; background: var(--bg-raised); }
.side-box h3 { font-size: 1rem; margin-bottom: 10px; }

/* ----------------------------------------------------------------- browse */
.browse { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding-top: 22px; }
.browse-side { font-size: 0.9rem; }
.browse-side h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin: 20px 0 6px; }
.browse-side h4:first-child { margin-top: 0; }
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list a { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 4px; color: var(--text); text-decoration: none; }
.filter-list a:hover { background: var(--bg-alt); }
.filter-list a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.filter-list .n { color: var(--faint); font-size: 0.8rem; }
.browse-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.browse-head h1 { font-size: 1.5rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 14px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); font-size: 0.82rem; font-weight: 600; text-decoration: none !important; cursor: pointer; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .x { opacity: 0.7; font-weight: 800; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--muted); font-weight: 700; font-size: 0.9rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; text-decoration: none !important; white-space: nowrap; font-family: inherit; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a.active, .tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.filter-toggle { display: none; }
@media (max-width: 860px) {
  .browse { grid-template-columns: 1fr; }
  .browse-side { display: none; }
  .browse-side.open { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
  .filter-toggle { display: inline-flex; }
}
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; text-align: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-weight: 700; font-size: 0.9rem; text-decoration: none !important; }
.pagination a:hover { border-color: var(--text); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius); }
.empty h3 { color: var(--text); }

/* -------------------------------------------------------------- game page */
.game-page { --g-bg: #1b1b28; --g-bg2: #262636; --g-text: #e6e6f0; --g-link: #ff6f91; --g-button: #ff6f91; background: var(--g-bg); color: var(--g-text); padding: 0 0 40px; min-height: calc(100vh - var(--header-h)); }
.game-page a { color: var(--g-link); }
.game-topbar { background: rgba(0,0,0,0.35); color: #fff; font-size: 0.85rem; }
.game-topbar .inner { max-width: 980px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; }
.game-topbar a, .game-topbar button { color: #fff; opacity: 0.9; font-weight: 700; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.game-topbar a:hover, .game-topbar button:hover { opacity: 1; text-decoration: underline; }
.game-topbar .spacer { flex: 1; }
.game-column { max-width: 980px; margin: 22px auto 0; background: var(--g-bg2); border-radius: 4px; box-shadow: 0 2px 30px rgba(0,0,0,0.25); overflow: hidden; }
.game-header { padding: 26px 28px 8px; }
.game-header h1 { font-size: 2.2rem; margin-bottom: 4px; color: var(--g-text); }
.game-header .by { opacity: 0.75; }
.game-embed { background: #000; position: relative; }
.game-embed .frame-wrap { position: relative; margin: 0 auto; max-width: 100%; }
.game-embed iframe { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; background: #000; transform-origin: 0 0; }
.game-embed .frame-wrap:fullscreen { width: 100% !important; max-width: none; aspect-ratio: auto; background: #000; }
.game-embed .splash { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.game-embed .splash::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(3px); }
.game-embed .splash > * { position: relative; }
.game-embed .splash .btn { background: var(--g-button); border-color: var(--g-button); color: #fff; }
.game-embed .splash p { color: #fff; margin: 0; }
.embed-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 10px; background: rgba(0,0,0,0.4); }
.embed-bar button { background: none; border: 0; color: #fff; opacity: 0.85; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.embed-bar button:hover { opacity: 1; }
.game-body { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 22px 28px 28px; }
@media (max-width: 860px) { .game-body { grid-template-columns: 1fr; } .game-header h1 { font-size: 1.7rem; } }
.game-body .shots { display: flex; flex-direction: column; gap: 12px; }
.game-body .shots img { border-radius: 3px; cursor: zoom-in; aspect-ratio: 630 / 500; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .game-body .shots { flex-direction: row; overflow-x: auto; } .game-body .shots img { width: 260px; flex-shrink: 0; } }
.formatted { overflow-wrap: anywhere; }
.formatted h2 { font-size: 1.4rem; margin-top: 1.2em; }
.formatted h3 { font-size: 1.1rem; margin-top: 1.2em; }
.formatted > :first-child { margin-top: 0; }
.formatted ul, .formatted ol { padding-left: 1.4em; margin: 0 0 1em; }
.formatted blockquote { margin: 0 0 1em; padding: 4px 14px; border-left: 3px solid currentColor; opacity: 0.85; }
.formatted img { margin: 10px 0; border-radius: 4px; }
.game-page .formatted code, .game-page .formatted pre { background: rgba(127,127,127,0.18); color: inherit; }
.info-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 6px 0 18px; }
.info-table td { padding: 6px 4px; border-top: 1px solid rgba(127,127,127,0.25); vertical-align: top; }
.info-table td:first-child { width: 150px; opacity: 0.7; }
details.more-info summary { cursor: pointer; font-weight: 700; padding: 6px 0; color: var(--g-link); }
.purchase-box { border: 1px solid rgba(127,127,127,0.3); border-radius: var(--radius); padding: 18px; margin: 22px 0; }
.purchase-box h2 { font-size: 1.15rem; }
.purchase-box .buy-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px; }
.purchase-box .price { font-size: 1.1rem; font-weight: 800; }
.purchase-box .price .was { text-decoration: line-through; opacity: 0.6; font-weight: 600; margin-right: 6px; }
.purchase-box .price .off { background: var(--sale); color: #fff; padding: 2px 6px; border-radius: 3px; font-size: 0.8rem; margin-left: 6px; }
.btn.g-btn { background: var(--g-button); border-color: var(--g-button); color: #fff; }
.btn.g-btn:hover { filter: brightness(1.1); }
.btn.g-ghost { background: transparent; border-color: rgba(127,127,127,0.45); color: var(--g-text); }
.btn.g-ghost:hover { border-color: var(--g-text); }
.uploads { list-style: none; padding: 0; margin: 0; }
.uploads li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(127,127,127,0.22); flex-wrap: wrap; }
.uploads .fname { font-weight: 700; word-break: break-all; }
.uploads .fsize { opacity: 0.65; font-size: 0.85rem; }
.uploads .grow { min-width: 160px; }
.item-grid { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.item-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-card .thumb { aspect-ratio: 1; border-radius: 6px; overflow: hidden; display: grid; place-items: center; padding: 8px;
  background: #f3f1ec repeating-conic-gradient(#e7e4dd 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.item-card .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item-card .iname { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.item-card .fsize { opacity: 0.65; font-size: 0.78rem; word-break: break-all; }
.item-card .btn { align-self: flex-start; margin-top: auto; }
.comments { margin-top: 26px; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid rgba(127,127,127,0.22); }
.comment .body { flex: 1; min-width: 0; }
.comment .head { font-size: 0.85rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.comment .head strong a { color: inherit; }
.comment .text { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form textarea { min-height: 80px; margin-bottom: 8px; }
.game-page textarea, .game-page input[type='text'], .game-page input[type='number'], .game-page input[type='email'] { background: rgba(127,127,127,0.1); color: var(--g-text); border-color: rgba(127,127,127,0.4); }
.rate-box { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0 20px; font-size: 0.9rem; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 8px 0; border-top: 1px solid rgba(127,127,127,0.22); font-size: 0.9rem; }
.side-list li:first-child { border-top: 0; }
.mini-game { display: flex; gap: 10px; align-items: center; padding: 6px 0; color: inherit !important; text-decoration: none !important; }
.mini-game img { width: 76px; aspect-ratio: 315/250; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.mini-game strong { display: block; font-size: 0.9rem; line-height: 1.25; }
.mini-game span { font-size: 0.8rem; opacity: 0.7; }
.mini-game:hover strong { text-decoration: underline; }

/* ---------------------------------------------------------------- modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 10, 20, 0.6); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; animation: fade 0.15s ease-out; }
.modal { background: var(--bg-raised); color: var(--text); border-radius: 8px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); animation: pop 0.18s ease-out; }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal .game-mini-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.modal .game-mini-head img { width: 110px; border-radius: 4px; aspect-ratio: 315/250; object-fit: cover; }
.modal .demo-note { background: var(--bg-alt); border-radius: var(--radius); padding: 10px 12px; font-size: 0.82rem; color: var(--muted); margin-top: 14px; }
.lightbox img { width: 100%; image-rendering: auto; border-radius: 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 36px); }
.toast { background: #222; color: #fff; padding: 11px 16px; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,0.25); font-size: 0.9rem; animation: pop 0.2s ease-out; max-width: 380px; }
.toast.error { background: #b3261e; }
.toast.ok { background: #1f7a45; }

/* ----------------------------------------------------------------- auth */
.auth-box { max-width: 420px; margin: 40px auto; border: 1px solid var(--border); border-radius: 8px; padding: 28px; background: var(--bg-raised); box-shadow: var(--shadow); }
.auth-box h1 { font-size: 1.5rem; }
.auth-box .alt { margin-top: 18px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.demo-hint { background: var(--accent-soft); color: var(--text); padding: 10px 12px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 18px; }

/* -------------------------------------------------------------- profile */
.profile-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 30px 0; }
.profile-head .container { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin: 0 0 4px; }
.profile-head .bio { max-width: 640px; margin: 6px 0 0; }
.profile-stats { display: flex; gap: 18px; font-size: 0.9rem; color: var(--muted); }
.profile-stats strong { color: var(--text); }

/* ------------------------------------------------------------ dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-raised); }
.stat-card .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.stat-card .value { font-size: 1.6rem; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.project-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.project-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-top: 1px solid var(--border); background: var(--bg-raised); }
.project-row:first-child { border-top: 0; }
.project-row img { width: 110px; aspect-ratio: 315/250; object-fit: cover; border-radius: 4px; }
.project-row h3 { margin: 0 0 4px; font-size: 1.05rem; }
.project-row h3 a { color: var(--text); }
.project-row .nums { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.83rem; color: var(--muted); margin-top: 4px; }
.project-row .nums strong { color: var(--text); font-variant-numeric: tabular-nums; }
.project-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .project-row { grid-template-columns: 80px 1fr; } .project-row img { width: 80px; } .project-row .actions { grid-column: 1 / -1; justify-content: flex-start; } }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar:hover { fill: var(--accent-hover); }
.chart .axis { stroke: var(--border); }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart-tip { font-size: 0.85rem; color: var(--muted); min-height: 1.4em; }

/* ---------------------------------------------------------------- editor */
.editor { display: grid; grid-template-columns: 1fr 320px; gap: 36px; }
@media (max-width: 960px) { .editor { grid-template-columns: 1fr; } }
.editor-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; background: var(--bg-raised); }
.editor-section > h2 { font-size: 1.05rem; margin-bottom: 14px; }
.editor-side { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.cover-preview { aspect-ratio: 315/250; border-radius: 4px; overflow: hidden; background: var(--bg-alt); border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 10px; }
.shot-grid .shot { position: relative; }
.shot-grid img { aspect-ratio: 630/500; object-fit: cover; border-radius: 4px; width: 100%; }
.shot-grid .shot button { position: absolute; top: 4px; right: 4px; }
.upload-list { list-style: none; padding: 0; margin: 0 0 14px; }
.upload-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-list .plats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.progress { height: 6px; background: var(--bg-alt); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width 0.1s; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.theme-grid label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.85rem; margin: 0; }
.theme-preview { border-radius: var(--radius); padding: 14px; margin-top: 14px; font-size: 0.9rem; }
.theme-preview .inner { padding: 12px; border-radius: 4px; }
.md-tabs { display: flex; gap: 2px; margin-bottom: 6px; }
.md-tabs button { background: none; border: 1px solid transparent; border-radius: 4px; padding: 4px 10px; font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.md-tabs button.active { border-color: var(--border); color: var(--text); background: var(--bg-alt); }
.md-preview { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 12px 14px; min-height: 280px; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); }
.tag-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 120px; padding: 4px !important; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag-suggest button { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; border: 1px dashed var(--border-strong); background: none; color: var(--muted); cursor: pointer; font-family: inherit; }
.tag-suggest button:hover { color: var(--text); border-color: var(--text); }
.danger-zone { border-color: #e7b3b3; }

/* ------------------------------------------------------------------ jams */
.jam-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.jam-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-raised); display: flex; flex-direction: column; color: var(--text) !important; text-decoration: none !important; transition: box-shadow 0.15s, transform 0.15s; }
.jam-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.jam-card .banner { height: 90px; position: relative; overflow: hidden; }
.jam-card .banner::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%); background-size: 24px 24px; }
.jam-card .banner .badge { position: absolute; top: 10px; left: 10px; z-index: 1; }
.jam-card .body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.jam-card h3 { margin: 0; font-size: 1.1rem; }
.jam-card .when { font-weight: 700; font-size: 0.9rem; }
.jam-card .nums { display: flex; gap: 16px; font-size: 0.85rem; color: var(--muted); margin-top: auto; padding-top: 8px; }
.jam-hero { color: #fff; padding: 36px 0 28px; position: relative; overflow: hidden; }
.jam-hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, rgba(255,255,255,.12) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.12) 75%, transparent 75%); background-size: 32px 32px; pointer-events: none; }
.jam-hero .container { position: relative; z-index: 1; }
.jam-hero h1 { font-size: 2.3rem; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.jam-hero .host { opacity: 0.95; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.jam-hero .host a { color: #fff; font-weight: 700; }
.countdown { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: flex-end; }
.countdown .unit { background: rgba(0,0,0,0.35); border-radius: 6px; padding: 8px 12px; text-align: center; min-width: 66px; }
.countdown .unit b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown .unit span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.countdown .label { font-weight: 700; margin-right: 6px; align-self: center; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.jam-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
@media (max-width: 900px) { .jam-layout { grid-template-columns: 1fr; } }
.theme-reveal { font-size: 1.4rem; font-weight: 800; padding: 14px; border-radius: var(--radius); background: var(--bg-alt); text-align: center; margin-bottom: 18px; }
.entry-row { display: grid; grid-template-columns: 40px 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); align-items: start; }
.entry-row .rank { font-size: 1.5rem; font-weight: 900; color: var(--faint); text-align: center; }
.entry-row .rank.top { color: #f5b400; }
.entry-row img { width: 140px; aspect-ratio: 315/250; object-fit: cover; border-radius: 4px; }
.entry-row h3 { margin: 0 0 2px; font-size: 1rem; }
.entry-row h3 a { color: var(--text); }
.score-table { font-size: 0.85rem; border-collapse: collapse; margin-top: 8px; }
.score-table td, .score-table th { padding: 3px 10px 3px 0; text-align: left; }
.score-table th { font-weight: 600; color: var(--muted); }
.vote-grid { display: grid; grid-template-columns: auto auto; gap: 4px 14px; align-items: center; margin-top: 8px; font-size: 0.85rem; }
@media (max-width: 600px) { .entry-row { grid-template-columns: 30px 90px 1fr; } .entry-row img { width: 90px; } }

/* --------------------------------------------------------------- devlogs */
.devlog-list { display: flex; flex-direction: column; gap: 14px; }
.devlog-card { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); }
.devlog-card img { width: 150px; aspect-ratio: 315/250; object-fit: cover; border-radius: 4px; }
.devlog-card h3 { margin: 4px 0; font-size: 1.1rem; }
.devlog-card h3 a { color: var(--text); }
.devlog-card .excerpt { color: var(--muted); font-size: 0.9rem; margin: 4px 0 6px; }
.devlog-card .meta { font-size: 0.82rem; color: var(--faint); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .devlog-card { grid-template-columns: 1fr; } .devlog-card img { width: 100%; } }
.devlog-mini { display: block; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text) !important; text-decoration: none !important; }
.devlog-mini:first-of-type { border-top: 0; }
.devlog-mini strong { display: block; font-size: 0.92rem; line-height: 1.3; }
.devlog-mini:hover strong { text-decoration: underline; }
.devlog-mini span { font-size: 0.8rem; color: var(--faint); }

/* -------------------------------------------------------------- collections */
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.collection-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text) !important; text-decoration: none !important; background: var(--bg-raised); transition: box-shadow 0.15s; }
.collection-card:hover { box-shadow: var(--shadow); }
.collection-card .mosaic { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 315/250; background: var(--bg-alt); }
.collection-card .mosaic img { width: 100%; height: 100%; object-fit: cover; }
.collection-card .body { padding: 10px 12px; }
.collection-card strong { display: block; }
.collection-card span { font-size: 0.82rem; color: var(--muted); }
.collection-pick { list-style: none; padding: 0; margin: 0 0 16px; max-height: 280px; overflow-y: auto; }
.collection-pick li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 10px; }

.feed-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.feed-item:first-child { border-top: 0; }
.feed-item .what { font-size: 0.9rem; }
.feed-item .card { display: flex; gap: 12px; margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text) !important; text-decoration: none !important; }
.feed-item .card img { width: 120px; aspect-ratio: 315/250; object-fit: cover; border-radius: 3px; }

.loading { display: flex; justify-content: center; padding: 80px 0; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); margin-bottom: 18px; font-size: 0.9rem; }
.notice.ok { background: #e8f6ee; border-color: #b9e2c9; color: #1f5c38; }
.notice.warn { background: #fff6e0; border-color: #f0d9a0; color: #6b4e00; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .notice.ok { background: #183325; border-color: #2a5a3f; color: #b7e8c9; }
  :root:not([data-theme='light']) .notice.warn { background: #3a2f12; border-color: #5c4a1a; color: #f2dc9e; }
  :root:not([data-theme='light']) .form-error { background: #3a1a1a; border-color: #6b2a2a; color: #ffb4ab; }
}
:root[data-theme='dark'] .notice.ok { background: #183325; border-color: #2a5a3f; color: #b7e8c9; }
:root[data-theme='dark'] .notice.warn { background: #3a2f12; border-color: #5c4a1a; color: #f2dc9e; }
:root[data-theme='dark'] .form-error { background: #3a1a1a; border-color: #6b2a2a; color: #ffb4ab; }
.game-page .notice { background: rgba(127,127,127,0.12); border-color: rgba(127,127,127,0.3); color: inherit; }

/* -------------------------------------------------------- profiles & studios */
.profile-links { margin-top: 10px; }
.profile-links .chip { font-weight: 600; }
.person-list { display: flex; flex-direction: column; gap: 4px; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius); color: var(--text) !important; text-decoration: none !important; }
.person:hover { background: var(--bg-alt); }
.person span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.person strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--muted); font-size: 0.78rem; text-transform: capitalize; }
.activity-list { display: flex; flex-direction: column; }
.activity { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.activity:first-child { border-top: 0; }
.activity img { width: 90px; aspect-ratio: 315/250; object-fit: cover; border-radius: 4px; }
.activity .text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }

.studio-hero { color: #fff; padding: 34px 0 28px; position: relative; overflow: hidden; }
.studio-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px); background-size: 16px 16px; pointer-events: none; }
.studio-hero .container { position: relative; z-index: 1; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.studio-hero h1 { margin: 6px 0 2px; font-size: 2.1rem; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.studio-hero .tagline { margin: 0 0 4px; opacity: 0.95; font-size: 1.05rem; }
.studio-hero .meta { font-size: 0.9rem; opacity: 0.9; }
.studio-hero .profile-stats, .studio-hero .profile-stats strong { color: #fff; }
.studio-hero .chip { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: #fff; }
.studio-hero .btn:not(.primary) { background: rgba(0,0,0,0.25); color: #fff; border-color: rgba(255,255,255,0.4); }
.studio-hero .avatar.lg { box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.team-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--text) !important; text-decoration: none !important; transition: box-shadow 0.15s; }
.team-card:hover { box-shadow: var(--shadow); }
.team-card .avatar { width: 64px; height: 64px; }
.member-list { list-style: none; padding: 0; margin: 0; }
.member-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.member-row:first-child { border-top: 0; }
.member-row select { width: auto; }
.studio-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.studio-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); flex-wrap: wrap; }
.studio-card strong { color: var(--text); }

/* ------------------------------------------------------------ directory */
.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.creator-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--text) !important; text-decoration: none !important; transition: box-shadow 0.15s, transform 0.15s; }
.creator-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.creator-card .avatar { width: 56px; height: 56px; }
.creator-card strong { display: block; }
.creator-card p { margin: 6px 0; color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.studio-tile { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-raised); color: var(--text) !important; text-decoration: none !important; transition: box-shadow 0.15s, transform 0.15s; }
.studio-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.studio-tile .banner { height: 70px; position: relative; }
.studio-tile .banner .avatar { position: absolute; left: 14px; bottom: -22px; width: 52px; height: 52px; border: 3px solid var(--bg-raised); }
.studio-tile .body { padding: 28px 14px 14px; }
.studio-tile p { margin: 4px 0 6px; }
