/* Fethi Online site header v3 (site/_nav.html; user spec 2026-11-01). Self-contained: loaded by _nav.html itself, so every
   site page, the wiki, the legal pages AND the game's pre-game screens (/oyna, index.html) draw the very same header with the
   same rules. Everything is scoped to .fs-top (the game page has its own --gold / --panel / button rules), no global resets.
   Widths: > 1280 full; 901-1280 compact (sans nav, compact FO, shorter name); <= 900 phone: logo · FO · Oyna · hamburger.
   Also the cross-document page transition (header stays, the content fades / slides): the site pages and /oyna share it. */
@font-face { font-family: 'Cinzel'; font-weight: 400 900; font-display: block; src: url(../ui/fonts/cinzel-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cinzel'; font-weight: 400 900; font-display: block; src: url(../ui/fonts/cinzel-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-weight: 200 900; font-display: block; src: url(../ui/fonts/sourcesans3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-weight: 200 900; font-display: block; src: url(../ui/fonts/sourcesans3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root { --fs-hh: 68px; }                      /* header height: the site's --nav-h and the game shell's content top */
@media (max-width: 900px) { :root { --fs-hh: 60px; } }

.fs-top {
  --h-gold: #e3c278; --h-gold2: #f3dba0; --h-gold3: #c99a45; --h-title: #f3e6c0; --h-text: #d7e2e6; --h-muted: #9fb3bb;
  --h-line: rgba(227, 194, 120, .25); --h-line2: rgba(227, 194, 120, .35); --h-panel: #0b2230; --h-input-line: #2c4b5d;
  --h-serif: Cinzel, "Palatino Linotype", Georgia, serif; --h-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --h-gut: 24px;
  position: sticky; top: 0; z-index: 90; flex: none; height: var(--fs-hh); background: #050f14;   /* opaque: the same pixels on every page */
  border-bottom: 1px solid var(--h-line);
  font: 400 15px/1.2 var(--h-sans); color: var(--h-text); -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  view-transition-name: fs-top;
}
.fs-top *, .fs-top *::before, .fs-top *::after { box-sizing: border-box; }
.fs-top [hidden] { display: none !important; }
.fs-top a { color: inherit; text-decoration: none; }
.fs-top button { font: inherit; color: inherit; margin: 0; }
.fs-top a:focus-visible, .fs-top button:focus-visible, .fs-top li:focus-visible { outline: 2px solid var(--h-gold); outline-offset: 2px; }
@media (max-width: 600px) { .fs-top { --h-gut: 16px; } }
.fs-topin { display: flex; align-items: center; gap: 16px; height: 100%; width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--h-gut); }
.fs-brand { display: flex; align-items: center; flex: none; height: 100%; }
.fs-brand img { display: block; height: 48px; width: auto; max-width: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }

/* nav */
.fs-nav { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; }
.fs-nav a { padding: 8px 8px; border-radius: 6px; color: var(--h-title); font: 600 15px/20px var(--h-serif); letter-spacing: .03em; white-space: nowrap; }
.fs-nav a:hover { color: var(--h-gold2); background: rgba(227, 194, 120, .08); }
.fs-nav a[aria-current="page"] { color: var(--h-gold2); box-shadow: inset 0 -2px 0 var(--h-gold); border-radius: 0; }

/* right-side group: language is always its first item */
.fs-right { flex: none; display: flex; align-items: center; gap: 10px; margin-left: auto; }
html:not(.fs-authed) .fs-top .fs-in, html.fs-authed .fs-top .fs-out { display: none !important; }

.fs-lang { position: relative; flex: none; }
.fs-lang-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 8px; border: 1px solid transparent;
  background: none; cursor: pointer; }
.fs-flag { display: block; line-height: 0; }
.fl { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .28); }
.fs-lang-btn:focus-visible, .fs-dlang button:focus-visible { outline: 2px solid var(--h-gold2); outline-offset: 1px; }
.fs-lang-btn:hover, .fs-lang-btn[aria-expanded="true"] { border-color: var(--h-gold3); color: var(--h-gold2); }
.fs-lang-pop, .fs-acct-pop { position: absolute; top: calc(100% + 8px); z-index: 95; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--h-line2); border-radius: 10px; background: rgba(5, 15, 20, .98); box-shadow: 0 14px 30px rgba(0, 0, 0, .55); }
.fs-lang-pop { left: 0; min-width: 176px; }
[dir="rtl"] .fs-lang-pop { left: auto; right: 0; }
.fs-lang-pop li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 6px; color: var(--h-text); cursor: pointer; font: 600 14px/1 var(--h-sans); }
.fs-lang-pop li .fl { flex: none; }
.fs-lang-pop li:hover, .fs-lang-pop li:focus { background: rgba(227, 194, 120, .12); color: var(--h-gold2); outline: none; }
.fs-lang-pop li[aria-selected="true"] { color: var(--h-gold2); box-shadow: inset 2px 0 0 var(--h-gold); }

/* buttons: secondary (Giriş yap) and gold primary (Kayıt ol / Oyna) */
.fs-hb { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 40px; padding: 0 18px; border-radius: 6px;
  border: 1px solid rgba(227, 194, 120, .55); background: rgba(7, 19, 25, .6); color: var(--h-title); font: 600 15px/1 var(--h-serif);
  letter-spacing: .03em; white-space: nowrap; cursor: pointer; }
.fs-hb:hover { background: rgba(227, 194, 120, .14); color: var(--h-gold2); }
.fs-hb-gold { border: 0; background: linear-gradient(#f0d48f, #c99a45); color: #2a1a05; padding: 0 22px; }
.fs-hb-gold:hover { background: linear-gradient(#f6dda0, #d3a752); color: #2a1a05; }


/* the ONE account button: avatar + character name + chevron, dropdown */
.fs-acct { position: relative; flex: none; }
.fs-acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 5px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--h-input-line); background: var(--h-panel); color: var(--h-title); font: 600 15px/1 var(--h-serif); letter-spacing: .02em; }
.fs-acct-btn:hover, .fs-acct-btn[aria-expanded="true"] { border-color: var(--h-gold3); color: var(--h-gold2); }
.fs-acct-btn .cv { flex: none; opacity: .8; }
.fs-me-n { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fs-av { flex: none; display: block; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(227, 194, 120, .6);
  background: rgba(3, 10, 14, .6) radial-gradient(circle at 50% 38%, rgba(227, 194, 120, .35) 0 22%, transparent 23%); }
.fs-av img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 12%; }
.fs-acct-pop { right: 0; min-width: 220px; display: flex; flex-direction: column; }
.fs-acct-pop[hidden] { display: none; }
.fs-acct-pop a, .fs-acct-pop button { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: none;
  color: var(--h-text); font: 600 15px/1 var(--h-sans); text-align: start; white-space: nowrap; cursor: pointer; }
.fs-acct-pop a:hover, .fs-acct-pop a:focus, .fs-acct-pop button:hover, .fs-acct-pop button:focus { background: rgba(227, 194, 120, .12); color: var(--h-gold2); outline: none; }
.fs-acct-pop hr { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--h-line); }
.fs-acct-pop .fs-logout { color: #f0a59c; }

/* hamburger + phone menu */
.fs-menu { display: none; flex: none; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 6px; background: transparent;
  color: var(--h-gold); cursor: pointer; align-items: center; justify-content: center; }
.fs-menu svg { display: block; }
.fs-menu .x { display: none; }
.fs-top.open .fs-menu .x { display: block; } .fs-top.open .fs-menu .b { display: none; }
.fs-drawer { display: none; }

/* 901-1280: compact (sans nav, compact FO, shorter name) */
@media (max-width: 1280px) {
  .fs-topin { gap: 12px; }
  .fs-nav a { padding: 8px 6px; font: 600 15px/20px var(--h-sans); letter-spacing: .01em; }
  .fs-right { gap: 8px; }
  .fs-me-n { max-width: 110px; }
  .fs-hb { padding: 0 14px; } .fs-hb-gold { padding: 0 16px; }
}
@media (max-width: 1100px) {
  .fs-topin { gap: 10px; }
  .fs-brand img { height: 42px; }
  .fs-nav { gap: 0; }
  .fs-nav a { padding: 8px 5px; font-size: 14px; }
  .fs-me-n { max-width: 84px; }
  .fs-acct-btn { gap: 6px; padding-right: 8px; }
}
@media (max-width: 1000px) {
  .fs-topin { gap: 8px; }
  .fs-brand img { height: 38px; }
  .fs-nav a { padding: 8px 4px; font-size: 13.5px; letter-spacing: 0; }
  .fs-right { gap: 6px; }
  .fs-me-n { max-width: 64px; }
  .fs-hb { padding: 0 12px; font-size: 14px; } .fs-hb-gold { padding: 0 14px; }
}
/* phone / tablet: logo · FO · Oyna · hamburger */
@media (max-width: 900px) {
  .fs-topin { gap: 10px; }
  .fs-brand img { height: 40px; }
  .fs-nav, .fs-lang, .fs-acct, .fs-right > .fs-out { display: none !important; }
  .fs-menu { display: inline-flex; }
  .fs-play { height: 38px; padding: 0 16px; }
  .fs-drawer { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; max-height: calc(100dvh - var(--fs-hh)); overflow-y: auto;
    padding: 4px var(--h-gut) 16px; background: rgba(5, 15, 20, .98); border-bottom: 1px solid var(--h-line2); box-shadow: 0 16px 30px rgba(0, 0, 0, .5); }
  .fs-top.open .fs-drawer { display: flex; }
  .fs-dnav { display: flex; flex-direction: column; }
  .fs-dnav a, .fs-dacct > a, .fs-dacct > button { display: flex; align-items: center; min-height: 48px; padding: 0 4px; border: 0; border-bottom: 1px solid rgba(227, 194, 120, .1);
    background: none; color: var(--h-title); font: 600 17px/1.2 var(--h-serif); letter-spacing: .03em; text-align: start; cursor: pointer; }
  .fs-dnav a[aria-current="page"] { color: var(--h-gold2); box-shadow: inset 3px 0 0 var(--h-gold); padding-left: 12px; }
  .fs-dacct { display: flex; flex-direction: column; margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--h-line2); }
  .fs-dacct > a, .fs-dacct > button { font: 600 16px/1.2 var(--h-sans); color: var(--h-text); }
  .fs-dacct .fs-logout { color: #f0a59c; border-bottom: 0; }
  .fs-dme { display: flex; align-items: center; gap: 10px; min-height: 52px; color: var(--h-gold2); font: 700 17px/1.2 var(--h-serif); }
  .fs-dme .fs-me-n { max-width: none; }
  .fs-dout { flex-direction: row; gap: 10px; padding-top: 14px; }
  .fs-dout .fs-hb { flex: 1; height: 46px; border-bottom: 1px solid rgba(227, 194, 120, .55); }
  .fs-dout .fs-hb-gold { border: 0; }
  .fs-dlang { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--h-line2); color: var(--h-gold); }
  .fs-dlang button { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 48px; border: 1px solid var(--h-input-line); border-radius: 6px; background: var(--h-panel); color: var(--h-text);
    font: 700 14px/1 var(--h-sans); cursor: pointer; }
  .fs-dlang button[aria-pressed="true"] { border-color: #e3c278; background: rgba(227, 194, 120, .22); }
}
@media (max-width: 380px) { .fs-play { padding: 0 12px; } }

/* ---- page transitions (site + /oyna's pre-game screens): the header stays in place, the content fades / slides a little */
@view-transition { navigation: auto; }
::view-transition { pointer-events: none; }      /* taps / typing during the 220 ms reach the live page (the new screen) */
::view-transition-group(fs-top) { animation: none; }
::view-transition-old(fs-top), ::view-transition-new(fs-top) { animation: none; mix-blend-mode: normal; }
::view-transition-old(fs-main) { animation: 140ms ease-in both fs-out; }
::view-transition-new(fs-main) { animation: 220ms cubic-bezier(.2, .7, .3, 1) 40ms both fs-in; }
::view-transition-group(fs-main) { animation-duration: 220ms; }
@keyframes fs-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes fs-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* BETA badge on the logo (web-only, our own design): gold outline pill at the logo's top-right, out of flow so nothing shifts */
.fs-brand { position: relative; }
.fs-brand::after { content: "BETA"; position: absolute; right: -12px; top: 3px; padding: 1px 5px 0; border: 1px solid var(--gold, #e3c278); border-radius: 999px;
  font: 700 10px/13px system-ui, sans-serif; letter-spacing: .1em; color: var(--gold, #e3c278); background: rgba(7, 19, 25, .7); pointer-events: none; }
