/* Medici Games — public site */
:root {
  --bg: #0e0b07;
  --bg-2: #15110b;
  --surface: #1b160e;
  --surface-2: #241d12;
  --line: rgba(212, 166, 74, .16);
  --line-2: rgba(212, 166, 74, .32);
  --gold: #d4a64a;
  --gold-2: #f1d58c;
  --gold-3: #8a6a2b;
  --text: #f3ece0;
  --muted: #a99c86;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(212, 166, 74, .08), transparent 60%);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(14, 11, 7, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.topbar-in .nav { margin-left: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: .06em; }
.brand img { filter: drop-shadow(0 0 10px rgba(212, 166, 74, .3)); }
.brand:hover { color: var(--gold-2); }
.brand-sm { font-size: 1rem; }
.nav { display: flex; gap: 26px; font-weight: 500; font-size: .95rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav .nav-admin { color: var(--gold); }

/* Buttons & chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s; white-space: nowrap; font-family: var(--body); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #b98a33); color: #1a1206; box-shadow: 0 8px 24px -10px rgba(212, 166, 74, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { color: #000; transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(212, 166, 74, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .02em; background: rgba(212, 166, 74, .14); color: var(--gold-2); border: 1px solid var(--line-2); font-family: var(--body); }
.chip-dim { background: rgba(255, 255, 255, .06); color: var(--text); border-color: rgba(255, 255, 255, .12); }
button.chip { cursor: pointer; background: transparent; color: var(--muted); border-color: var(--line); }
button.chip:hover { color: var(--text); border-color: var(--line-2); }
button.chip.is-on { background: var(--gold); color: #1a1206; border-color: var(--gold); }

/* Hero */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-slide { grid-area: 1 / 1; position: relative; display: flex; align-items: flex-end; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-bg, .hero-bg .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 11, 7, .96) 0%, rgba(14, 11, 7, .75) 38%, rgba(14, 11, 7, .15) 75%), linear-gradient(0deg, var(--bg) 0%, transparent 40%); }
.hero-slide.is-active .hero-img { animation: kenburns 18s ease-out both; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-in { position: relative; padding: 120px 0 90px; }
.hero-copy { max-width: 620px; }
.eyebrow { font-family: var(--display); color: var(--gold); letter-spacing: .3em; text-transform: uppercase; font-size: .8rem; font-weight: 700; margin: 0 0 14px; }
.hero h1 { text-shadow: 0 4px 30px rgba(0, 0, 0, .6); background: linear-gradient(180deg, #fff 30%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: #e2d8c6; margin: 0 0 22px; max-width: 54ch; }
.hero-meta { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-dots { position: absolute; bottom: 28px; right: max(20px, calc((100% - 1200px) / 2)); display: flex; gap: 10px; z-index: 2; }
.hero-dots button { width: 34px; height: 4px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.hero-dots button.is-active { background: var(--gold); }

.intro { text-align: center; padding: 56px 0 8px; }
.intro p { max-width: 64ch; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }
.intro::after { content: ''; display: block; width: 80px; height: 1px; margin: 34px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* Sections & grid */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.count { font-family: var(--body); font-size: .9rem; color: var(--muted); font-weight: 500; margin-left: 6px; vertical-align: middle; }
.filters { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
.search:focus-within { border-color: var(--gold); }
.search input { background: none; border: 0; outline: none; color: var(--text); font: inherit; width: 180px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.card-media .cover { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media .cover { transform: scale(1.05); }
.card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 11, 7, .55), transparent 50%); }
.badge { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(14, 11, 7, .75); color: var(--gold-2); border: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 6px; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--gold-2); }
.card-body p { color: var(--muted); margin: 0 0 16px; font-size: .93rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cover-ph { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, hsl(var(--h) 55% 32%), hsl(calc(var(--h) + 40) 45% 12%) 70%), var(--surface-2); }
.cover-ph span { font-family: var(--display); font-size: 3.4rem; font-weight: 800; color: rgba(255, 255, 255, .85); letter-spacing: .05em; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.hero-bg .cover-ph span { display: none; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

.about { border-top: 1px solid var(--line); }
.prose { color: #ddd2bf; max-width: 70ch; font-size: 1.05rem; }

/* Detail */
.detail-hero { position: relative; min-height: 420px; display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.detail-in { position: relative; padding: 100px 0 50px; }
.back { display: inline-block; color: var(--muted); margin-bottom: 18px; font-size: .9rem; }
.notice { display: inline-block; background: rgba(212, 166, 74, .15); border: 1px solid var(--line-2); color: var(--gold-2); padding: 4px 12px; border-radius: 8px; font-size: .85rem; }
.detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.detail-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 26px; aspect-ratio: 3 / 2; }
.detail-cover .cover { width: 100%; height: 100%; object-fit: cover; }
.facts { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.facts dl { margin: 0 0 20px; display: grid; gap: 4px 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin-top: 10px; font-weight: 600; }
.facts dd { margin: 0; color: var(--text); }
.notfound { text-align: center; padding: 120px 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 40px; }
.footer-in { padding: 34px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.footer p { margin: 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold-2); }

/* Player */
body.player { background: #000; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.player-bar { height: 48px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.player-bar h1 { font-size: 1rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); padding: 6px; border-radius: 8px; }
.player-back:hover { background: var(--surface-2); color: var(--text); }

.player-tools { display: flex; gap: 6px; }
.ptool { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer; font: 600 .82rem var(--body); }
.ptool:hover { border-color: var(--gold); color: var(--gold-2); }
.player-stage { flex: 1; position: relative; background: #000; }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 860px) {
  .detail-body { grid-template-columns: 1fr; }
  .facts { position: static; }
  .hero-in { padding: 100px 0 70px; }
  .nav { gap: 16px; }
  .search input { width: 130px; }
  .ptool span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

[hidden] { display: none !important; }

/* Signed-in avatar + menu */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid rgba(212, 166, 74, .55); box-shadow: 0 0 0 3px rgba(212, 166, 74, .12); font-family: var(--body); font-weight: 700; letter-spacing: .02em; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ini { background: radial-gradient(circle at 30% 25%, hsl(var(--h) 55% 45%), hsl(calc(var(--h) + 30) 50% 22%)); color: #fff; }
.umenu { position: relative; margin-left: 14px; }
.umenu summary { list-style: none; cursor: pointer; display: flex; border-radius: 50%; }
.umenu summary::-webkit-details-marker { display: none; }
.umenu summary:hover .avatar, .umenu[open] summary .avatar { border-color: var(--gold-2); }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 230px; background: #17130d; border: 1px solid rgba(212, 166, 74, .3); border-radius: 12px; padding: 6px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .85); z-index: 60; }
.umenu-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid rgba(212, 166, 74, .15); margin-bottom: 6px; }
.umenu-head b { display: block; color: var(--text); font-size: .92rem; }
.umenu-head small { color: var(--muted); font-size: .75rem; }
.umenu-pop a, .umenu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text) !important; font: 500 .88rem var(--body); background: none; border: 0; cursor: pointer; }
.umenu-pop a:hover, .umenu-pop button:hover { background: rgba(212, 166, 74, .12); color: var(--gold-2) !important; }
.umenu-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid rgba(212, 166, 74, .15); }
.profile-row { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
