/* 3DVR PAD Community — matches the 3dvrpad.com look (navy, gold, Space Grotesk). */
:root {
  --ink: #0a1730; --ink-2: #0d1e3f; --navy: #14305e; --navy-2: #1b3c72;
  --gold: #e6a23c; --gold-2: #f0be6a; --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.2);
  --text: #eef3fb; --muted: #b6c6e0; --dim: #7e93b6; --ok: #6fd39a; --warn: #f3c66b; --bad: #f08080;
  --font: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif; --head: "Space Grotesk", var(--font); --mono: "DM Mono", ui-monospace, monospace;
  --r: 16px; --max: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(1200px 600px at 80% -10%, #16315f 0%, rgba(22,49,95,0) 60%), var(--ink); color: var(--text); font: 16px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.3rem; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 56px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #16294a; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: var(--mono); font-size: .85em; word-break: break-all; }
.gold { color: var(--gold); }
.eyebrow { font-family: var(--mono); color: var(--gold); font-size: .72rem; letter-spacing: .14em; margin: 0 0 8px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10,23,48,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-bar { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--head); font-weight: 600; flex: none; }
.brand img { height: 34px; width: auto; }
.brand span { padding-left: 10px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: .95rem; }
.brand:hover { text-decoration: none; }
.top-search { flex: 1; max-width: 420px; margin-left: auto; }
.top-search input { width: 100%; }
.top-nav { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-link { color: var(--text); }
.nav-mod { color: var(--muted); font-size: .92rem; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 180px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.notice { background: rgba(230,162,60,.14); border-bottom: 1px solid rgba(230,162,60,.35); padding: 8px 0; font-size: .92rem; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #16294a; font-size: .75rem; font-weight: 700; text-align: center; line-height: 20px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,.06); color: var(--text); font: 600 .95rem var(--font); padding: 11px 22px; border-radius: 999px 14px; cursor: pointer; transition: transform .2s, filter .2s, background-color .2s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); background-color: rgba(255,255,255,.1); }
.btn-gold { background: linear-gradient(100deg, var(--gold) 0%, var(--gold-2) 100%); color: #16294a; border: 0; box-shadow: 0 12px 28px -14px rgba(230,162,60,.8); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-ok { background: rgba(111,211,154,.16); border-color: rgba(111,211,154,.45); color: #c9f2da; }
.btn-danger { background: rgba(240,128,128,.12); border-color: rgba(240,128,128,.45); color: #ffd0d0; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
button.link { background: none; border: 0; color: var(--gold-2); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(230,162,60,.2); }
select option { background: var(--ink-2); }
textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
input[type=checkbox] { width: auto; accent-color: var(--gold); }
input[type=file] { padding: 8px; }
label { display: block; font-weight: 600; font-size: .92rem; }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 400; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
fieldset { border: 1px dashed var(--line-2); border-radius: 12px; padding: 14px; margin: 0; display: grid; gap: 14px; }
legend { font-family: var(--mono); font-size: .75rem; color: var(--gold); letter-spacing: .1em; padding: 0 6px; }
.stack { display: grid; gap: 16px; }
.inline { display: inline; }
.hp { position: absolute; left: -5000px; }
.form-end { display: flex; justify-content: flex-end; }
.error { background: rgba(240,128,128,.12); border: 1px solid rgba(240,128,128,.4); color: #ffd6d6; padding: 10px 14px; border-radius: 10px; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 0 0 20px; background: rgba(111,211,154,.12); border: 1px solid rgba(111,211,154,.35); }
.flash-warn { background: rgba(243,198,107,.12); border-color: rgba(243,198,107,.4); }
.notice-inline { background: rgba(243,198,107,.1); border: 1px solid rgba(243,198,107,.35); padding: 8px 12px; border-radius: 10px; font-size: .92rem; }

/* cards & layout */
.card { background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02)); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; margin-bottom: 20px; }
.narrow { max-width: 480px; margin: 24px auto; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head-row h1 { margin: 0; }
.cat-head { border-left: 4px solid var(--c); padding-left: 16px; }
.cat-head p.muted { margin: 4px 0 0; }
.block { margin-bottom: 32px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.block-head h2 { margin: 0; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); }
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }

/* hero */
.hero { padding: 36px 0 28px; max-width: 760px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 600; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 620px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 18px; }
.hero-stats { display: flex; gap: 22px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.hero-stats b { color: var(--text); font-family: var(--head); font-size: 1.1rem; margin-right: 4px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }

/* categories */
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cat a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; background: rgba(255,255,255,.03); color: var(--text); transition: background .2s, transform .2s; }
.cat a:hover { background: rgba(255,255,255,.06); text-decoration: none; transform: translateX(2px); }
.cat b { font-family: var(--head); font-size: 1.02rem; }
.cat span { color: var(--muted); font-size: .88rem; }
.cat em { color: var(--dim); font-style: normal; font-size: .8rem; font-family: var(--mono); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text); padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip:hover { text-decoration: none; border-color: var(--c); }

/* topic rows */
.rows { list-style: none; margin: 0; padding: 0; }
.card-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: rgba(255,255,255,.02); margin-bottom: 16px; }
.row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.rows:not(.card-list) .row { padding-left: 0; padding-right: 0; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { color: var(--text); font-weight: 600; font-size: 1.02rem; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--dim); font-size: .82rem; margin-top: 4px; }
.row-stat { text-align: center; min-width: 56px; color: var(--dim); font-size: .75rem; line-height: 1.2; }
.row-stat b { display: block; color: var(--text); font-family: var(--head); font-size: 1.1rem; }
.row-cover { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.snip { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.snip mark { background: rgba(230,162,60,.3); color: var(--text); border-radius: 3px; padding: 0 2px; }
.flag { display: inline-block; font-size: .7rem; font-family: var(--mono); letter-spacing: .04em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; }
.flag-pin { color: var(--gold-2); border-color: rgba(230,162,60,.5); }
.flag-ok { color: var(--ok); border-color: rgba(111,211,154,.5); }
.flag-wait { color: var(--warn); border-color: rgba(243,198,107,.5); }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 999px; color: var(--muted); border: 1px solid transparent; }
.tabs a.on, .tabs a:hover { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.05); text-decoration: none; }
.pager { display: flex; justify-content: center; gap: 18px; align-items: center; color: var(--muted); font-size: .9rem; margin: 18px 0; }

/* showcase tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tiles-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile a { display: grid; gap: 6px; color: var(--text); }
.tile a:hover { text-decoration: none; }
.tile a:hover .tile-img { border-color: var(--gold); }
.tile-img { display: block; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, var(--navy), var(--ink-2)); transition: border-color .2s; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-ph { display: flex; height: 100%; align-items: center; justify-content: center; font-family: var(--head); font-size: 1.6rem; color: var(--gold); opacity: .7; }

/* topic page */
.topic-head { margin-bottom: 18px; }
.topic-head h1 { margin-bottom: 6px; }
.mod-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: .85rem; color: var(--muted); }
.mod-bar select { width: auto; padding: 5px 10px; font-size: .85rem; }
.tour { margin: 0 0 20px; }
.tour iframe { width: 100%; aspect-ratio: 16/9; border: 1px solid var(--line-2); border-radius: var(--r); background: #000; display: block; }
.tour figcaption { font-size: .85rem; margin-top: 6px; text-align: right; }
.tour-link { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; }
.cover img { border-radius: var(--r); max-height: 460px; width: 100%; object-fit: cover; }
.cover { margin: 0 0 20px; }
.post { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-side { flex: none; }
.post-main { flex: 1; min-width: 0; }
.post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.post-author { color: var(--text); font-weight: 700; }
.post-time { color: var(--dim); font-size: .82rem; }
.post-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.post-pending, .post-hidden { opacity: .72; }
.post-accepted { border-left: 3px solid var(--ok); padding-left: 14px; }
.answer-box { border: 1px solid rgba(111,211,154,.35); background: rgba(111,211,154,.05); border-radius: var(--r); padding: 14px 18px 0; margin: 8px 0 18px; }
.answer-box .post { border-bottom: 0; padding-top: 4px; }
.answer-box .post-accepted { border-left: 0; padding-left: 0; }
.like { background: none; border: 1px solid var(--line-2); color: var(--muted); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; min-width: 44px; }
.like.on { color: #ff9db5; border-color: rgba(255,157,181,.5); background: rgba(255,157,181,.08); }
.like.static { cursor: default; border-color: transparent; }
.report summary { cursor: pointer; color: var(--dim); font-size: .82rem; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report[open] { flex-basis: 100%; }
.report form { margin-top: 8px; max-width: 360px; }
.reply-box { margin-top: 24px; }
.rb { font-size: .68rem; font-family: var(--mono); padding: 1px 7px; border-radius: 6px; letter-spacing: .04em; }
.rb-admin { background: var(--gold); color: #16294a; }
.rb-mod { background: rgba(95,179,240,.2); color: #bfe3ff; }

/* avatars */
.av { --h: 210; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: hsl(var(--h) 45% 32%); color: hsl(var(--h) 80% 88%); font: 700 .85rem var(--head); border: 1px solid rgba(255,255,255,.15); flex: none; }
.av-sm { width: 34px; height: 34px; font-size: .78rem; }
.av-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.profile { display: flex; gap: 20px; align-items: center; }

/* post content */
.prose { overflow-wrap: anywhere; }
.prose p { margin: 0 0 .8em; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.2rem; margin: 1.1em 0 .4em; }
.prose h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 .8em; }
.prose blockquote { margin: 0 0 .8em; padding: 6px 14px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.04); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .88em; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; }
.prose pre { background: #071022; border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: 10px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.prose-page { max-width: 760px; }
.prose-page li { margin-bottom: 6px; }

/* editor */
.editor label { margin-bottom: 6px; }
.ed-tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 10px 10px 0 0; background: rgba(255,255,255,.03); }
.ed-tools button { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 6px; padding: 4px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.ed-tools button:hover { color: var(--text); border-color: var(--line-2); }
.ed-hint { margin-left: auto; font-size: .75rem; color: var(--dim); padding-right: 6px; }
.editor textarea { border-radius: 0 0 10px 10px; margin-top: 0; }
.thumb { width: 90px; height: 56px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; }

/* search */
.search-big { display: flex; gap: 10px; margin: 0 0 16px; max-width: 640px; }

/* admin */
.stat-tiles { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat-tiles li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: rgba(255,255,255,.03); }
.stat-tiles b { display: block; font: 600 1.7rem var(--head); }
.stat-tiles span { color: var(--muted); font-size: .85rem; }
.queue-item .prose { padding: 12px 14px; background: rgba(0,0,0,.18); border-radius: 10px; margin: 8px 0; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table select { width: auto; padding: 5px 8px; font-size: .85rem; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* footer */
.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; padding: 22px 0; }
.foot-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* topic form: tour fields only for Showcase */
#topic-form .showcase-only { display: none; }
#topic-form.is-showcase .showcase-only, .is-showcase #topic-form .showcase-only { display: grid; }

@media (max-width: 900px) {
  .home-grid, .cols-2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top-bar { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .top-search { order: 3; flex-basis: 100%; max-width: none; }
  .top-nav { margin-left: auto; }
  .brand span { display: none; }
  .card { padding: 18px; }
  .post .post-side { display: none; }
  .row-cover { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tiles-lg { grid-template-columns: 1fr; }
  .search-big { flex-direction: column; }
  .table th:nth-child(4), .table td:nth-child(4), .table th:nth-child(5), .table td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
