/* =========================================================================
   boylu play — site styles (NINEF cozy low-poly theme)
   Plain CSS, no build step. Sections:
   1 tokens · 2 base · 3 brand & header · 4 buttons & links · 5 forms
   6 home · 7 cards · 8 profile · 9 auth · 11 overlays · 12 responsive (the game page, /play, uses no site CSS)
   ========================================================================= */

/* 1. TOKENS -------------------------------------------------------------- */

/* NINEF: a cozy low-poly world. Warm cream paper, brown ink, meadow green,
   honey yellow and a soft sky. */
:root {
  color-scheme: light;

  --bg: #fff9f0;
  --bg-2: #f7f1e7;
  --paper: #fffdf8;
  --card: #fffcf6;
  --chip: #f4e8d3;
  --line: #ebddc6;
  --line-strong: #dcc6a4;

  --ink: #4a2f22;
  --ink-2: #6a4935;
  --ink-3: #977a64;

  /* "canal" is the link / accent colour: meadow green. */
  --canal: #8eac64;
  --canal-d: #6f8e48;
  --canal-l: rgba(142, 172, 100, .16);
  --canal-ink: #577634;

  --honey: #f3b24d;
  --honey-d: #d8922d;
  --honey-ink: #4a2f22;

  --tulip: #e5845a;
  --tulip-d: #c4673f;
  --tulip-l: rgba(229, 132, 90, .15);

  --green: #8eac64;
  --green-d: #6f8e48;
  --green-l: #a9c47a;
  --yellow: #f6cb72;
  /* deeper green for the big "play / sign in" buttons and ticked boxes */
  --leaf: #6d9b3f;
  --leaf-d: #557d2f;
  --sky: #bfe4f5;

  --espresso: #4a2f22;

  --glass: rgba(255, 250, 242, .92);
  --on-glass: #4a2f22;
  --on-glass-2: #6a4935;

  --shadow: 0 16px 34px -18px rgba(106, 73, 53, .32);
  --shadow-lg: 0 26px 60px -20px rgba(106, 73, 53, .36);

  --fd: 'Fredoka', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --fs: var(--fd);
  --fb: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --gut: clamp(16px, 3vw, 40px);
  --radius: 26px;
}

/* 2. BASE ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; padding: 0; }

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

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-family: var(--fd); font-weight: 700; letter-spacing: -.01em; line-height: 1.1; color: var(--ink); }

.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; }

.wrap { max-width: 1400px; margin: 0 auto; padding-inline: var(--gut); }

.dot { opacity: .55; margin-inline: 2px; }

.show-sm { display: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site { display: flex; flex-direction: column; }
.site-main { flex: 1; }

.plain-list { color: var(--ink-2); font-weight: 700; }

/* 3. BRAND & HEADER ------------------------------------------------------ */

.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand-logo { display: block; height: 52px; width: auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 249, 240, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220, 198, 164, .45);
  transition: background .25s, border-color .25s;
}

.bar { display: flex; align-items: center; gap: clamp(10px, 1.8vw, 26px); min-height: 72px; }
.site-header .wrap { max-width: 1400px; }

.bar-search {
  flex: 0 1 300px; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  height: 46px; padding: 0 16px; margin-left: auto;
  border-radius: 23px; border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .62); color: var(--ink-3);
  transition: border-color .15s, background .15s;
}
.bar-search:focus-within { border-color: var(--green); background: #fff; }
.bar-search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: none; color: var(--ink);
  font: 600 15px var(--fb);
}
.bar-search input::placeholder { color: var(--ink-3); }

.bar-right { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 16px); margin-left: auto; }

.bar-nav { display: flex; align-items: center; gap: clamp(4px, 1.6vw, 26px); margin-left: clamp(8px, 2.4vw, 40px); }

.bar-nav a, .bar-link {
  text-decoration: none;
  font: 700 15px var(--fb);
  padding: 10px 6px; border-radius: 14px;
  color: var(--ink);
  white-space: nowrap;
}
.bar-nav a:hover, .bar-link:hover { color: var(--canal-d); }
.bar-nav a[aria-current="page"] { color: var(--canal-d); box-shadow: inset 0 -3px 0 -1px var(--green-l); border-radius: 0; }

.bar-cta, .bar-discord {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 22px; min-height: 44px; border-radius: 22px; text-decoration: none; white-space: nowrap;
  font: 700 15px var(--fd);
  background: var(--green); color: #fff;
  box-shadow: inset 0 -3px 0 var(--green-d), 0 8px 18px -10px rgba(79, 110, 44, .7);
  font-weight: 600;
}
.bar-cta:hover, .bar-discord:hover { background: #9aba6e; color: #fff; }

/* Discord / GitHub / YouTube */
.socials { display: flex; align-items: center; gap: 4px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); transition: background .15s, color .15s, transform .15s; }
.socials a:hover { background: rgba(255, 255, 255, .7); color: var(--canal-d); transform: translateY(-1px); }
.socials .ico { width: 25px; height: 25px; }
.bar-social { gap: 6px; margin-right: 4px; }

/* language toggle */
.seg { display: inline-flex; background: var(--chip); border-radius: 20px; padding: 3px; }
.seg a {
  padding: 7px 11px; border-radius: 16px;
  font: 800 13px var(--fd); color: var(--ink-3); text-decoration: none;
}
.seg a:hover { color: var(--ink); }
.seg a[aria-current="true"] { background: var(--green); color: #fff; }
.seg-light { background: var(--chip); }
.seg-light a { color: var(--ink-2); }

/* user menu */
.menu { position: relative; }

.menu-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 9px 5px 6px; border-radius: 20px;
  color: var(--on-glass);
  transition: background .15s ease;
}
.menu-trigger:hover, .menu-trigger[aria-expanded="true"] { background: rgba(74, 47, 34, .07); }
.menu-trigger-icon { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; color: var(--ink); }
.menu-trigger-icon .ico { width: 22px; height: 22px; }
.menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; padding: 9px 10px 4px; border-top: 1px solid var(--line); color: var(--ink-3); font: 700 12.5px var(--fb); }

.avatar {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--honey);
  box-shadow: inset 0 -2px 0 var(--honey-d);
  color: var(--honey-ink); font: 800 13px var(--fd);
}
.avatar-lg { width: 80px; height: 80px; border-radius: 22px; font-size: 30px; box-shadow: inset 0 -4px 0 var(--honey-d); }

.menu-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13.5px var(--fd); }

.menu-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 230px; padding: 8px;
  border-radius: 18px;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
}

.menu-head { padding: 9px 10px 11px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.menu-head strong { display: block; font: 600 15px var(--fd); }
.menu-head span { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.menu-panel a, .menu-panel button {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 10px; border-radius: 12px;
  text-decoration: none; text-align: left;
  color: var(--ink-2); font: 700 13px var(--fb);
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--chip); color: var(--ink); }
.menu-panel .ico { width: 17px; height: 17px; }
.menu-panel .menu-danger { color: var(--tulip); }

/* "N playing now" — anonymous counts */
.live-dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: live 2s ease-out infinite;
}
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 16px;
  background: rgba(74, 47, 34, .06); color: var(--on-glass);
  font: 600 13px var(--fd); white-space: nowrap; cursor: default;
}
.live-pill b { font-weight: 600; }
.live-pill span:last-child { color: var(--on-glass-2); font-weight: 500; }
.live-pill[data-empty] .live-dot { background: #8a7a70; animation: none; }

.live-badge {
  position: absolute; right: 14px; top: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 12px;
  background: var(--glass); color: var(--on-glass);
  font: 600 12px var(--fd);
}

.live-tag {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  margin-left: 6px; padding: 2px 9px; border-radius: 10px;
  background: rgba(74, 222, 128, .18); color: #2f7a45;
  font: 700 11.5px var(--fb); letter-spacing: .02em;
}

/* footer: the bar sits on a meadow by the lake (footer-landscape.webp) */
.site-footer {
  position: relative; isolation: isolate;
  margin-top: clamp(24px, 4vw, 48px);
  padding-top: clamp(150px, 19vw, 300px);
  padding-bottom: calc(clamp(14px, 2vw, 26px) + env(safe-area-inset-bottom, 0px));
  color: var(--ink-2); font-size: 14px; font-weight: 700;
}
.footer-scene {
  position: absolute; inset: 0; z-index: -1;
  background: #a9c47a url(../images/ninef/footer-landscape-1000.webp) center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 34%);
}
@media (min-width: 1000px) {
  .footer-scene { background-image: url(../images/ninef/footer-landscape.webp); }
}

.footer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap;
  padding: 16px clamp(16px, 2.4vw, 28px);
  border-radius: 24px;
  background: rgba(255, 249, 240, .88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 14px 34px -18px rgba(74, 47, 34, .45);
}
.footer-id { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.footer-id .brand-logo { height: 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--ink); text-decoration: none; font: 500 15px var(--fd); }
.footer-links a:hover { color: var(--canal-d); }
.footer-small { margin: 0; font-size: 13.5px; font-weight: 600; }
.footer-small a { color: inherit; text-decoration: none; }

/* pages: games / about / legal */
.page-head { padding-block: clamp(24px, 4vw, 44px) clamp(22px, 3vw, 32px); }
.page-head h1 { display: block; margin: 16px 0 12px; font: 700 clamp(36px, 4.6vw, 60px)/1.05 var(--fd); }
.page-head h1 em { font-style: normal; color: var(--canal-d); }
.page-head .lede { margin: 0; }
.section.section-flush { padding-top: 0; }
.section-tight { padding-block: 8px clamp(24px, 4vw, 40px); }
.link-more { font-size: 15px; }
.more-row { display: flex; justify-content: center; margin-top: 24px; }

.games-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.games-search { flex: 0 1 320px; height: 44px; margin-left: 0; }
.games-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 800; }
.games-filterbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; min-height: 36px; }
.games-shown { font-size: 13.5px; font-weight: 700; }
.games-filterbar .chips { margin-bottom: 0; }
.games-tools { margin-bottom: 0; }
.shead-count { font-size: 15px; font-weight: 700; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; gap: 12px; padding: 18px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); }
.step h3 { margin: 0 0 4px; font-size: 17px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.step-n { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--canal); color: var(--honey-ink); font: 800 16px var(--fd); }

.maker {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch;
  overflow: hidden; border-radius: 30px;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.maker-copy { padding: clamp(22px, 4vw, 40px); display: grid; gap: 12px; justify-items: start; align-content: center; }
.maker h2 { margin: 0; font-size: clamp(24px, 2.4vw, 34px); }
.maker p { margin: 0; max-width: 60ch; color: var(--ink-2); font-weight: 600; }
.maker .muted { font-size: 13.5px; color: var(--ink-3); }
.maker-art {
  width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: 45% 62%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
  mask-image: linear-gradient(to right, transparent 0, #000 22%);
}

.faq { display: grid; gap: 10px; }
.faq-item { border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); padding: 4px 18px; }
.faq-item summary { cursor: pointer; padding: 12px 0; font: 600 16.5px var(--fd); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--canal); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 0 0 14px; color: var(--ink-2); font-weight: 600; }

/* support (/destek) */
.help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.help-card {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 16px 18px; border-radius: 22px; text-decoration: none;
  background: var(--card); border: 1.5px solid var(--line);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.help-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.help-card > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.help-card b { font: 600 17px var(--fd); color: var(--ink); }
.help-card small { color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.help-card-ico { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--canal-l); color: var(--canal-d); }
.help-card-go { color: var(--ink-3); flex: none; }
.help-card:hover .help-card-go { color: var(--canal-d); }

.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
.support-note { display: flex; align-items: center; gap: 7px; margin: 16px 0 0; font-size: 13.5px; font-weight: 700; }
.support-form { scroll-margin-top: 110px; }
.support-form .textarea { min-height: 150px; }
.support-form .select { width: 100%; }
.support-direct { display: flex; align-items: flex-start; gap: 8px; margin: 20px 0 0; padding-top: 16px; border-top: 1.5px dashed var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.support-direct .ico { margin-top: 3px; color: var(--canal-d); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ticket-message {
  margin: 0 0 14px; padding: 16px 18px; border-radius: 18px;
  background: var(--paper); border: 1.5px solid var(--line); border-left: 4px solid var(--canal);
  white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; color: var(--ink);
}
.log-lede { margin: 0 0 14px; font-size: 14px; font-weight: 700; }
.suspend-form { margin-top: 16px; padding-top: 16px; border-top: 1.5px dashed var(--line); }
a.chip { text-decoration: none; }
.chip[aria-pressed="true"] .muted { color: rgba(255, 255, 255, .8); }

.ticket-replies { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticket-reply { padding: 14px 16px; border-radius: 18px; background: var(--canal-l); }
.ticket-reply small { color: var(--canal-ink); font-size: 13px; font-weight: 700; }
.ticket-reply p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; color: var(--ink); }

.legal-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: 6px; }
.legal-nav a { padding: 9px 14px; border-radius: 14px; text-decoration: none; font: 600 15px var(--fd); color: var(--ink-2); background: var(--chip); }
.legal-nav a[aria-current="page"] { background: var(--green); color: #fff; }
.prose { max-width: 72ch; padding: clamp(20px, 4vw, 36px); border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--line); }
.prose .lead { margin-top: 0; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.prose h2 { margin: 28px 0 8px; font-size: 21px; }
.prose p, .prose li { color: var(--ink-2); font-weight: 600; line-height: 1.65; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--canal); font-weight: 800; }
.prose b { color: var(--ink); }

.legal-note { margin: -6px 0 18px; color: var(--ink-3); font-size: 12.5px; font-weight: 700; text-align: center; }
.legal-note a { color: var(--canal); }

/* 4. BUTTONS & LINKS ----------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 22px;
  border-radius: 22px; border: 0;
  font: 600 16.5px var(--fd); text-decoration: none; white-space: nowrap;
  background: var(--honey); color: var(--honey-ink);
  box-shadow: inset 0 -4px 0 var(--honey-d);
  cursor: pointer;
  transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--honey-d); }

.btn-ghost { background: var(--chip); color: var(--ink); box-shadow: inset 0 -4px 0 var(--line); }
.btn-ghost:active { box-shadow: inset 0 -1px 0 var(--line); }

.btn-honey { background: var(--honey); color: var(--honey-ink); box-shadow: inset 0 -4px 0 var(--honey-d); }

.btn-danger { background: var(--tulip); color: #fff; box-shadow: inset 0 -4px 0 var(--tulip-d); }
.btn-danger:active { box-shadow: inset 0 -1px 0 var(--tulip-d); }

.btn-danger-ghost { background: var(--tulip-l); color: #a94a22; box-shadow: inset 0 -3px 0 rgba(226, 87, 76, .25); }

.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 16px; gap: 7px; }

.btn-green { background: var(--green); color: #fff; box-shadow: inset 0 -4px 0 var(--green-d); }
.btn-green:active { box-shadow: inset 0 -1px 0 var(--green-d); }
.btn-sm .ico { width: 17px; height: 17px; }

.btn-block { width: 100%; }

.btn[aria-disabled="true"] { pointer-events: none; opacity: .6; }

.link {
  color: var(--canal-ink); font-weight: 800; font-size: 13.5px;
  text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0;
}
.link:hover { text-decoration: underline; }

.ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.count {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px;
  font: 800 14px/1 var(--fd); letter-spacing: 0;
  background: var(--tulip-l); color: #a94a22;
  border-radius: 15px;
}
.page-head h1 .count { margin-left: 8px; vertical-align: .12em; height: 40px; min-width: 40px; border-radius: 20px; font-size: 18px; }

/* 5. FORMS --------------------------------------------------------------- */

.form { display: grid; gap: 17px; }
.form-narrow { max-width: 480px; }

.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-row-start { justify-content: flex-start; gap: 18px; }

.field { display: grid; gap: 7px; }
.field-label { color: var(--ink-2); font-size: 13px; font-weight: 800; }

.field-control { position: relative; }

.field-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-3); pointer-events: none;
}

.input {
  width: 100%; min-height: 54px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 17px;
  background: var(--paper); color: var(--ink);
  font-size: 15px; font-weight: 700;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.has-icon .input { padding-left: 44px; }
.has-toggle .input { padding-right: 48px; }
.input::placeholder { color: var(--ink-3); font-weight: 600; }
.input:hover { border-color: var(--line-strong); }
.input:focus { border-color: var(--canal); box-shadow: 0 0 0 4px rgba(142, 172, 100, .2); }
.has-error .input { border-color: var(--tulip); }

.field-toggle {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; color: var(--ink-3);
}
.field-toggle:hover { background: var(--canal-l); color: var(--canal); }
.field-toggle .when-shown { display: none; }
.field-toggle[aria-pressed="true"] .when-shown { display: block; }
.field-toggle[aria-pressed="true"] .when-hidden { display: none; }

.field-hint { margin: 0; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.field-error { margin: 0; color: var(--tulip); font-size: 12.5px; font-weight: 800; }

.check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  width: 19px; height: 19px; margin: 0;
  border: 1.5px solid var(--line); border-radius: 6px;
  background: var(--paper);
  display: grid; place-items: center; cursor: pointer;
}
.check input::after {
  content: ''; width: 9px; height: 9px; border-radius: 3px;
  background: var(--canal); transform: scale(0); transition: transform .12s ease;
}
.check input:checked::after { transform: scale(1); }

.notice {
  display: flex; align-items: flex-start; gap: 9px;
  margin-bottom: 18px; padding: 11px 13px;
  border-radius: 14px;
  font-size: 13.5px; font-weight: 700;
}
.notice .ico { width: 18px; height: 18px; margin-top: 1px; }
.notice-ok { background: var(--canal-l); color: var(--canal-ink); }
.notice-error { background: var(--tulip-l); color: var(--tulip); }
.notice-warn { background: rgba(243, 178, 77, .18); color: #7a4f10; }

/* 6. HOME ---------------------------------------------------------------- */

/* Laid out after the NINEF reference: a floating island hero, a cream sheet that
   rises over it on a wave, blurred trees framing the edges. */
body.home { background: var(--bg); overflow-x: hidden; }
.home .site-main { position: relative; }
.home .site-header { position: fixed; left: 0; right: 0; }
.home .site-header:not(.is-scrolled) {
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}

.wrap-wide { max-width: none; padding-inline: clamp(16px, 6vw, 110px); }

/* blurred trees, rocks and a fence at the far edges (cropped from the reference art) */
.side-deco {
  position: absolute; z-index: 3; pointer-events: none; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.side-deco-left { left: 0; top: clamp(170px, 12vw, 200px); width: clamp(70px, 7.4vw, 124px); }
.side-deco-right { right: 0; top: clamp(300px, 20vw, 345px); width: clamp(66px, 6.8vw, 112px); }

.hero-world {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(480px, 28.6vw, 560px);
  padding-top: 72px;
  background: #bfe4f5;
}

/* mountains, sea and clouds taken from the left edge of the island art */
/* sharp mountains, sea and a little floating isle on the left (from the island art's own edge) */
.hero-left {
  position: absolute; z-index: -2; left: 0; top: 0; bottom: 0; width: 64vw;
  /* the strip and its mirror tile seamlessly; kept near the island's own scale */
  background: 0 46% / auto 112% repeat-x;
  -webkit-mask-image: linear-gradient(to right, #000 34%, rgba(0, 0, 0, .6) 62%, transparent 96%);
  mask-image: linear-gradient(to right, #000 34%, rgba(0, 0, 0, .6) 62%, transparent 96%);
}
.hero-sky { position: absolute; inset: -12px; z-index: -3; background: center 40% / cover no-repeat; }

/* the island: big, on the right, feathered into the sky */
.hero-art { position: absolute; z-index: -1; top: -1.4vw; right: -1vw; width: 63vw; aspect-ratio: 2 / 1; }
.hero-art img {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, .55) 14%, #000 32%), linear-gradient(to bottom, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, .55) 14%, #000 32%), linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-composite: intersect;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-5px); } }

.hero { position: relative; max-width: 1340px; padding-top: clamp(8px, 1vw, 18px); padding-bottom: 104px; }
.hero-copy { position: relative; display: table; max-width: 100%; }

/* torn sheet of paper behind the headline */
.hero-paper {
  position: relative; display: table;
  margin-left: -42px;
  padding: clamp(22px, 2vw, 34px) clamp(26px, 2.4vw, 40px) clamp(24px, 2.1vw, 34px) 42px;
}
.hero-paper::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='8 3 379 189' preserveAspectRatio='none'%3E%3Cpath d='M9 16l18-5 22 3 19-6 24 4 21-5 25 4 22-3 20 5 24-6 21 3 23-4 22 5 20-4 24 3 21-6 22 4 24-2 3 22-4 24 5 21-3 25 4 23-5 22 3 24-4 18-21 3-24-4-22 5-25-3-20 4-23-5-21 4-24-3-22 5-20-4-25 3-21-5-23 4-19-3-22 5-17-3-3-23 4-24-5-21 3-25-4-22 5-23z' fill='%23f8f0e2' fill-opacity='.95'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 18px rgba(106, 73, 53, .16));
  transform: rotate(-1.2deg);
}
.hero-sprout { position: absolute; left: 50%; top: -24px; width: 60px; height: 34px; transform: translateX(-80%); }
.hero-sprout-stem { fill: none; stroke: #6f8e48; stroke-width: 2.4; stroke-linecap: round; }
.hero-sprout-leaf { fill: #8eac64; }
.hero-sprout-line { fill: none; stroke: #6a4935; stroke-width: 1.6; stroke-linecap: round; opacity: .7; }

.hero h1 { margin: 0; font: 700 clamp(40px, 3.55vw, 62px)/1 var(--fd); letter-spacing: -.01em; }
.hero h1 span { position: relative; display: table; white-space: nowrap; }
.hero-star { position: absolute; right: -1.05em; top: .02em; width: .5em; height: .5em; color: #f2b33a; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: rotate(18deg) scale(.88); } }

.hero .lede { margin: clamp(10px, .9vw, 14px) 0 0; max-width: 17.4em; font: 600 clamp(16px, 1.1vw, 19px)/1.4 var(--fb); color: var(--ink-2); }

/* Buttons sit below the paper, clear of its torn edge. */
.hero .ctas { margin-top: clamp(14px, 1.3vw, 20px); gap: 20px; }
.btn-play, .btn-soft { min-height: clamp(46px, 3vw, 52px); border-radius: 26px; font: 700 clamp(15px, 1vw, 17px) var(--fd); }
.btn-play {
  padding: 0 28px 0 12px; gap: 14px;
  background: linear-gradient(180deg, #f8c665, #f1ac3f); color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(200, 128, 30, .55), 0 12px 22px -12px rgba(216, 146, 45, .85);
}
.btn-dot { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #f8c665; }
.btn-dot .ico { width: 12px; height: 12px; margin-left: 2px; }
.btn-soft {
  padding: 0 24px 0 20px; gap: 10px;
  background: rgba(250, 244, 233, .92); color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(220, 198, 164, .7), 0 12px 22px -14px rgba(106, 73, 53, .5);
}
.btn-soft .ico-sprout { width: 22px; height: 22px; }

.bird { position: absolute; z-index: 1; width: 18px; fill: none; stroke: #8a5a3a; stroke-width: 2; stroke-linecap: round; opacity: .6; pointer-events: none; animation: drift 40s ease-in-out infinite; }
.bird-1 { top: 13%; left: 52%; }
.bird-2 { top: 6%; left: 70%; width: 13px; animation-duration: 52s; animation-delay: -14s; }
@keyframes drift { 50% { transform: translate(90px, -10px); } }

.welcome-chip {
  display: flex; width: fit-content; align-items: center; gap: 7px;
  margin-bottom: 16px; padding: 7px 13px;
  background: rgba(255, 255, 255, .75); color: var(--ink-2);
  border-radius: 16px; font: 700 13.5px var(--fb);
}
.welcome-chip strong { color: var(--canal-d); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px var(--fd); letter-spacing: .06em; text-transform: uppercase;
  color: var(--canal-ink); background: var(--canal-l);
  padding: 6px 12px 6px 8px; border-radius: 16px;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--honey); display: inline-block; margin-left: 2px; }

.lede { font-size: clamp(16px, 1.4vw, 18px); color: var(--ink-2); max-width: 68ch; margin: 0; font-weight: 600; }

/* genre chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 21px;
  border: 1.5px solid var(--line); background: rgba(255, 255, 255, .7);
  font: 500 15.5px var(--fd); color: var(--ink);
  transition: border-color .15s, background .15s;
}
.chip .ico { color: var(--green-d); }
.chip:hover { border-color: var(--line-strong); background: #fff; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; box-shadow: inset 0 -3px 0 var(--green-d); }
.chip[aria-pressed="true"] .ico { color: #fff; }

.btn-dark { background: var(--espresso); color: #ffe2b0; box-shadow: none; border-radius: 26px; }
.btn-dark:active { box-shadow: none; }

.playhex { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--honey-d); display: grid; place-items: center; transition: transform .15s; }
.playhex i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--honey); color: var(--honey-ink); margin-top: -3px; }
.playhex .ico { width: 22px; height: 22px; margin-left: 3px; }
.mini-card:hover .playhex { transform: scale(1.06); }
.playhex-sm { width: 42px; height: 42px; }
.playhex-sm i { width: 40px; height: 40px; }
.playhex-sm .ico { width: 17px; height: 17px; }

.section { padding-block: clamp(36px, 5vw, 64px); scroll-margin-top: 90px; }

.shead { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.shead h2 { font: 700 clamp(26px, 3vw, 36px)/1.1 var(--fd); margin: 0; display: flex; align-items: center; gap: 12px; }
.shead-ico { display: grid; place-items: center; color: var(--ink); }
.shead-ico .ico { width: 34px; height: 34px; stroke-width: 2.1; }
.shead-side { display: flex; align-items: center; gap: 18px; }

.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font: 500 15px var(--fd); text-decoration: none; }
.link-more:hover { color: var(--canal-d); }
.link-more .ico { transition: transform .2s; }
.link-more:hover .ico { transform: translateX(3px); }

.section-games {
  position: relative; z-index: 1;
  margin-top: -64px;
  padding-block: 0;
  background: var(--bg);
}
/* the cream sheet's top edge: a soft wave over the island */
.section-games::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 46' preserveAspectRatio='none'%3E%3Cpath d='M0 30C160 18 300 6 470 8s310 26 480 26 330-24 490-30v42H0z' fill='%23fff9f0'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

.section-games .shead { margin-bottom: 10px; align-items: center; }
.section-games .shead h2, .desk-head h2 { gap: 10px; }
.section-games .shead h2 { font: 800 clamp(24px, 1.75vw, 30px)/1 var(--fd); }
.shead-ico { width: 1.25em; height: 1.25em; color: #6a4935; }
.doodle { width: 38px; height: 19px; margin-left: 2px; fill: none; stroke: #6a4935; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.link-small { font: 700 12px var(--fb); color: var(--ink); }
.link-small .ico { width: 13px; height: 13px; }

/* home: one row of cards, sideways scroll when there are more than fit */
.games-row .grid {
  --cols: 4; --gap: clamp(14px, 1.5vw, 24px);
  grid-template-columns: none; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: -10px -8px 0; padding: 10px 8px 12px;
  scrollbar-width: none;
}
.games-row .grid::-webkit-scrollbar { display: none; }
.games-row .card { scroll-snap-align: start; }
.games-row .card .cbody > p:not(.card-genres), .games-row .card-go { display: none; }
.games-row .cover img { object-position: 50% 8%; }
.games-row .cover { aspect-ratio: 2.2 / 1; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0h100v88c-9 7-19 9-31 6s-22-7-36-3S6 98 0 94z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0h100v88c-9 7-19 9-31 6s-22-7-36-3S6 98 0 94z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.games-row .card h3 { font-size: clamp(18px, 1.3vw, 22px); letter-spacing: .02em; }
.games-row .cbody { padding: 4px 12px 6px; gap: 2px; }

/* bottom row: studio · from our desk · join, resting on the meadow */
.section-studio { position: relative; z-index: 2; padding-block: 8px 0; }
/* the bottom cards stand on the meadow: the footer shows just the grass, flowers and fence */
.home .site-footer { margin-top: clamp(-240px, -12vw, -160px); padding-top: clamp(220px, 15vw, 290px); }
.home .footer-scene {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .25) 22%, rgba(0, 0, 0, .75) 44%, #000 62%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .25) 22%, rgba(0, 0, 0, .75) 44%, #000 62%);
}
.studio-row > * { min-width: 0; }
.studio-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(14px, 1.3vw, 20px); align-items: start; }

.studio-card, .desk-card, .join-card {
  position: relative;
  border-radius: 20px; background: rgba(252, 247, 238, .96);
  box-shadow: 0 2px 0 rgba(106, 73, 53, .05), 0 16px 30px -18px rgba(106, 73, 53, .45);
}

.studio-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: clamp(160px, 11vw, 186px); margin-top: 6px; }
.studio-copy { position: relative; z-index: 1; align-self: center; padding: clamp(14px, 1.4vw, 22px) 0 clamp(14px, 1.4vw, 22px) clamp(16px, 1.5vw, 24px); }
.studio-copy h2 { margin: 0 0 8px; font: 700 clamp(18px, 1.4vw, 24px)/1.08 var(--fd); }
.studio-copy h2 span { display: block; }
.studio-copy p { margin: 0; color: var(--ink-2); font: 600 clamp(11.5px, .76vw, 13px)/1.42 var(--fb); }
/* the camp scene breaks out of the top of the card */
.studio-art {
  align-self: end; width: 100%; height: calc(100% + 26px); margin-top: -26px;
  object-fit: cover; object-position: 42% 66%;
  border-radius: 0 0 20px 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%), linear-gradient(to bottom, transparent 0, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 16%), linear-gradient(to bottom, transparent 0, #000 22%);
  mask-composite: intersect;
}

.desk-card { padding: 12px clamp(12px, 1.1vw, 18px) 14px; margin-top: 14px; }
.desk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.desk-head h2 { display: flex; align-items: center; margin: 0; font: 800 clamp(17px, 1.2vw, 21px)/1 var(--fd); }
.desk-ico { width: 1.15em; height: 1.15em; color: #a5623a; transform: rotate(-8deg); }
.desk-head .doodle { width: 30px; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, .8vw, 14px); }
.note {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 10px 9px 9px; border-radius: 6px;
  background: #fffaf2;
  box-shadow: 0 1px 0 rgba(106, 73, 53, .06), 0 6px 14px -8px rgba(106, 73, 53, .45);
}
.note:nth-child(2) { transform: translateY(-2px); }
.note::before {
  content: ''; position: absolute; top: -7px; left: 50%; width: 38px; height: 13px;
  background: rgba(226, 203, 160, .78); transform: translateX(-50%) rotate(-3deg);
}
.note-tape-corner::before { left: auto; right: -9px; top: -4px; width: 30px; background: rgba(243, 178, 77, .85); transform: rotate(38deg); }
.note time { color: var(--ink-3); font: 700 10px var(--fb); }
.note h3 { margin: 0 0 4px; font: 800 clamp(12px, .85vw, 14px)/1.12 var(--fd); min-height: 2.24em; }
.note img { width: 100%; height: auto; aspect-ratio: 2.1 / 1; object-fit: cover; object-position: 50% 10%; border-radius: 5px; }

.join-card { padding: clamp(14px, 1.4vw, 22px) clamp(14px, 1.4vw, 22px) clamp(14px, 1.3vw, 20px); margin-top: 16px; }
.join-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 800 clamp(16px, 1.2vw, 21px)/1.1 var(--fd); }
.join-ico { width: 1.1em; height: 1.1em; color: #6f9a52; flex: none; }
.join-card p { margin: 0 0 12px; color: var(--ink-2); font: 600 clamp(12px, .82vw, 13.5px)/1.45 var(--fb); }
.join-cloud { position: absolute; right: 18px; top: 10px; width: 36px; fill: #e6eef3; }
.join-go { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #7d9c52; color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.join-go .ico { width: 16px; height: 16px; }

/* guests: sign up */
.join-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--leaf); color: #fff; box-shadow: inset 0 -3px 0 var(--leaf-d); font-size: 15px; }
.join-btn:active { box-shadow: inset 0 -1px 0 var(--leaf-d); }
.join-btn .ico { width: 16px; height: 16px; }
.join-card .join-small { margin: 10px 0 0; }

/* players: who you are, the last game, saves & friends */
.join-me { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 36px; }
.join-me h2 { margin-bottom: 4px; }
.join-card .join-me p { margin: 0; }
.join-avatar { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 6px 14px -8px rgba(74, 47, 34, .5); }
.join-continue {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 18px;
  background: #fffdf9; box-shadow: inset 0 0 0 1px rgba(220, 198, 164, .6);
  color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.join-continue:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 20px -16px rgba(74, 47, 34, .6); }
.join-continue img { width: 72px; height: 44px; flex: none; object-fit: cover; border-radius: 10px; }
.join-continue > span:not(.join-go) { flex: 1; min-width: 0; }
.join-continue small { display: block; color: var(--ink-3); font: 700 12px var(--fb); }
.join-continue b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/1.2 var(--fd); }
.join-continue .join-go { background: var(--leaf); }
.join-continue .join-go .ico { margin-left: 2px; }
.join-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.join-links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px;
  background: #f3ebde; color: var(--ink-2); font: 600 13.5px var(--fd); text-decoration: none;
}
.join-links a:hover { background: #ece0cc; color: var(--ink); }
.join-links .menu-badge { margin-left: 2px; }

.about { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.pillar {
  background: var(--paper); border-radius: 26px; padding: 22px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.pillar .ph { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, var(--green-l), var(--green-d)); }
.pillar:nth-child(2) .ph { background: linear-gradient(160deg, var(--yellow), var(--honey-d)); color: var(--ink); }
.pillar:nth-child(3) .ph { background: linear-gradient(160deg, #cde9f6, #7fb8d6); color: #24506a; }
.pillar h3 { margin: 6px 0 0; font-size: 20px; }
.pillar p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* 7. CARDS --------------------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 22px; }

.card {
  position: relative; display: flex; flex-direction: column;
  overflow: hidden; border-radius: 18px;
  background: #fbf5ea; border: 0; padding: 5px;
  box-shadow: 0 2px 0 rgba(106, 73, 53, .05), 0 18px 34px -22px rgba(106, 73, 53, .45);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 2px 0 rgba(106, 73, 53, .05), 0 28px 44px -22px rgba(106, 73, 53, .55); }
.card:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }

.cover { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; background: var(--chip); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .cover img { transform: scale(1.02); }

/* Playable · New · In the works · Soon */
.badge {
  position: absolute; left: 12px; top: 12px;
  padding: 3px 11px; border-radius: 13px;
  font: 700 12.5px var(--fb);
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 4px 10px -6px rgba(74, 47, 34, .5);
}
.badge-live, .badge-new { background: #c9dea0; color: #36531a; }
.badge-dev { background: #f6cb72; color: #5c3d0a; }
.badge-soon { background: #e4dbf7; color: #4e3a88; }

.cbody { position: relative; padding: 10px 12px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1; }
.card h3 { margin: 0; padding-right: 46px; font: 800 21px/1.1 var(--fd); letter-spacing: .01em; text-transform: uppercase; }
.card p { margin: 0; color: var(--ink-3); font-size: 14px; font-weight: 600; line-height: 1.45; }
.card .card-genres { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.card-genres i { font-style: normal; color: var(--line-strong); }

.card-go {
  position: absolute; right: 12px; top: 12px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--chip); color: var(--ink);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.card-go .ico { width: 18px; height: 18px; }
.card:hover .card-go { transform: translateX(3px); background: var(--green); color: #fff; }

.card-link { color: inherit; text-decoration: none; outline: 0; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-soon { font: 700 12px var(--fb); color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.card.is-soon { opacity: .75; }

/* "Yeni · Simülasyon" */
.gpill {
  padding: 3px 9px; border-radius: 9px;
  font: 800 12px var(--fd); letter-spacing: -.01em;
  background: var(--chip); color: var(--ink-2);
}
.g-racing, .g-simulation { background: rgba(243, 178, 77, .2); color: #7a4f10; }
.g-adventure { background: rgba(142, 172, 100, .2); color: #4b6a29; }
.g-relaxing { background: rgba(110, 170, 210, .2); color: #2c6385; }
.g-puzzle { background: rgba(190, 130, 205, .2); color: #723f80; }

.status {
  position: absolute; left: 14px; top: 14px;
  font: 800 12px var(--fd); letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 12px;
  background: var(--glass); color: var(--on-glass);
}
.status.new { background: var(--honey); color: var(--honey-ink); }
.status.dev { background: var(--yellow); color: var(--ink); }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: 700 12px var(--fb); padding: 3px 9px; border-radius: 10px; background: var(--chip); color: var(--ink-2); }
.tag.soft { background: var(--canal-l); color: var(--canal-ink); }

.card-save {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px; color: var(--canal-ink);
  font-size: 12.5px; font-weight: 800;
}
.card-save .ico { width: 16px; height: 16px; }

.card.soon {
  border: 2px dashed var(--line-strong); background: rgba(255, 255, 255, .4); box-shadow: none;
  align-items: center; justify-content: center; text-align: center;
  padding: 30px 22px; min-height: 300px; gap: 12px;
}
.card.soon:hover { transform: none; box-shadow: none; }
.card.soon h3 { font-size: 19px; }
.card.soon p { max-width: 30ch; }

.soonhex { width: 76px; height: 76px; border-radius: 22px; background: var(--chip); display: grid; place-items: center; color: var(--ink-3); }
.soonhex .ico { width: 30px; height: 30px; }

.card-skeleton { min-height: 300px; pointer-events: none; }
.card-skeleton .cover, .card-skeleton i {
  background: linear-gradient(90deg, var(--chip) 0%, var(--paper) 50%, var(--chip) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.card-skeleton i { display: block; width: 100%; height: 14px; border-radius: 8px; }
.card-skeleton i:first-child { height: 20px; width: 55%; }
.card-skeleton i:last-child { width: 70%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.grid-message { grid-column: 1 / -1; color: var(--ink-2); font-weight: 700; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 7b. GAME LIBRARY (/oyunlar) -------------------------------------------- */

/* hero: one featured game over its wide art (games.json "hero") */
.lib-hero { position: relative; isolation: isolate; height: clamp(320px, 26vw, 440px); overflow: hidden; background: #3b4a2c; }
.lib-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(34, 24, 12, .62) 0%, rgba(34, 24, 12, .34) 30%, rgba(34, 24, 12, 0) 58%),
    linear-gradient(0deg, rgba(34, 24, 12, .3) 0%, rgba(34, 24, 12, 0) 26%);
}
.lib-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }

.lib-hero-copy {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-bottom: 12px; color: #fff;
}
.lib-flag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px 5px 11px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .85); background: rgba(34, 24, 12, .28);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font: 600 14px var(--fd);
}
.lib-flag .ico { color: var(--honey); }
.lib-hero-copy h1, .lib-hero-copy h2 { margin: 14px 0 10px; color: #fff; font: 700 clamp(36px, 4.2vw, 64px)/1 var(--fd); letter-spacing: -.01em; text-shadow: 0 3px 16px rgba(20, 12, 4, .4); }
.lib-hero-copy p {
  max-width: 27em; margin: 0; color: rgba(255, 255, 255, .96);
  font: 600 clamp(15px, 1.15vw, 18px)/1.45 var(--fb); text-shadow: 0 2px 10px rgba(20, 12, 4, .45);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.lib-hero-copy .ctas { margin-top: clamp(16px, 1.8vw, 26px); gap: 14px; }
.lib-btn-play, .lib-btn-glass { min-height: 52px; padding: 0 26px; border-radius: 16px; font: 600 17px var(--fd); }
.lib-btn-play { background: var(--leaf); color: #fff; box-shadow: inset 0 -4px 0 var(--leaf-d); }
.lib-btn-play:active { box-shadow: inset 0 -1px 0 var(--leaf-d); }
.lib-btn-play .ico { width: 18px; height: 18px; transition: transform .2s; }
.lib-btn-play:hover .ico { transform: translateX(3px); }
.lib-btn-glass {
  background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none;
  border: 1.5px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lib-btn-glass:active { box-shadow: none; }

.lib-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-block: 0 18px; }
.lib-facts dt { color: var(--ink-3); font: 800 11.5px var(--fb); text-transform: uppercase; letter-spacing: .05em; }
.lib-facts dd { margin: 2px 0 0; font: 700 14.5px var(--fb); color: var(--ink); }

/* category chips · sort */
.lib-section { padding-top: clamp(16px, 1.6vw, 24px); }
.lib-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: clamp(18px, 1.8vw, 26px); }
.lib-topbar .chips { flex: 1; min-width: 0; margin-bottom: 0; }
.lib-topbar .chip { background: #fff; border-color: transparent; box-shadow: 0 8px 18px -14px rgba(106, 73, 53, .5); }
.lib-topbar .chip:hover { border-color: var(--line); }
.lib-topbar .chip[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); box-shadow: inset 0 -3px 0 var(--leaf-d); }

.lib-sort {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding-left: 14px; border-radius: 14px;
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
}
.lib-sort:focus-within { border-color: var(--leaf); }
.lib-sort select {
  appearance: none; -webkit-appearance: none; height: 100%; padding: 0 38px 0 0;
  border: 0; outline: 0; background: none; cursor: pointer;
  font: 600 15px var(--fd); color: var(--ink);
}
.lib-sort-chev { position: absolute; right: 13px; pointer-events: none; color: var(--ink-2); }

/* sidebar · results */
.lib-body { display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: clamp(18px, 2vw, 30px); align-items: start; }
.lib-side {
  position: sticky; top: 92px;
  padding: 18px 18px 6px; border-radius: 20px; background: #fff;
  box-shadow: 0 2px 0 rgba(106, 73, 53, .04), 0 18px 34px -26px rgba(106, 73, 53, .5);
}
.lib-search { flex: none; width: 100%; height: 44px; margin: 0 0 18px; background: var(--bg); }
.lib-group { margin: 0; padding: 0 0 12px; border: 0; min-width: 0; }
.lib-group + .lib-group { padding-top: 14px; border-top: 1.5px solid var(--line); }
.lib-group legend { float: left; width: 100%; padding: 0; margin-bottom: 6px; font: 700 16.5px var(--fd); color: var(--ink); }

.lib-opt {
  clear: both; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 7px 0; cursor: pointer; color: var(--ink-2); font: 600 14.5px var(--fb);
}
.lib-opt-radio { grid-template-columns: auto minmax(0, 1fr) auto; }
.lib-opt:hover { color: var(--ink); }
.lib-opt input {
  appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer;
  width: 20px; height: 20px; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); border-radius: 6px; background: #fff;
  transition: background .15s, border-color .15s;
}
.lib-opt input[type="radio"] { border-radius: 50%; }
.lib-opt input::after { content: ''; width: 5px; height: 9px; margin-top: -2px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
.lib-opt input:checked { background: var(--leaf); border-color: var(--leaf); }
.lib-opt input:checked::after { transform: rotate(45deg) scale(1); }
.lib-opt input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.lib-opt:has(input:checked) { color: var(--ink); }
.lib-opt-ico { width: 18px; height: 18px; color: var(--ink); }
.lib-count { min-width: 26px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 7px; background: var(--bg-2); color: var(--ink-3); font: 800 12px var(--fb); }
.lib-opt:has(input:checked) .lib-count { background: var(--leaf); color: #fff; }

/* library cards: cover, title + platforms, two pills, a play button */
.grid-library { grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: clamp(14px, 1.5vw, 22px); }
.lcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px; background: #fff;
  box-shadow: 0 2px 0 rgba(106, 73, 53, .04), 0 18px 30px -24px rgba(106, 73, 53, .55);
  transition: transform .22s ease, box-shadow .22s ease;
}
.lcard:hover { transform: translateY(-4px); box-shadow: 0 2px 0 rgba(106, 73, 53, .04), 0 26px 40px -24px rgba(106, 73, 53, .6); }
.lcard:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }
.lcard-cover { position: relative; aspect-ratio: 2.15 / 1; background: var(--chip); overflow: hidden; }
.lcard-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .5s ease; }
.lcard:hover .lcard-cover img { transform: scale(1.04); }
.lcard-cover .live-badge { right: 10px; top: 10px; }
.lcard-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
.lcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lcard h3 { margin: 0; min-width: 0; font: 700 19px/1.15 var(--fd); letter-spacing: 0; }
.lcard-plat { display: flex; gap: 6px; flex: none; color: var(--ink-2); }
.lcard-plat .ico { width: 18px; height: 18px; }

.lib-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ltag { padding: 3px 10px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); font: 600 12.5px var(--fb); }
.ltag.g-racing, .ltag.g-simulation { background: rgba(243, 178, 77, .18); color: #7a4f10; }
.ltag.g-adventure { background: rgba(229, 132, 90, .14); color: #a24a22; }
.ltag.g-relaxing { background: rgba(110, 170, 210, .18); color: #2c6385; }
.ltag.g-puzzle { background: rgba(190, 130, 205, .18); color: #723f80; }

.lcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lcard-save { margin-right: auto; min-width: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--canal-ink); font: 800 12px var(--fb); }
.lcard-save span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard-save .ico { width: 16px; height: 16px; }
.lbtn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 38px; padding: 0 16px; border-radius: 12px;
  font: 600 14.5px var(--fd); text-decoration: none; white-space: nowrap;
}
.lbtn .ico { width: 16px; height: 16px; transition: transform .2s; }
.lbtn-play { background: var(--leaf); color: #fff; box-shadow: inset 0 -3px 0 var(--leaf-d); outline: 0; }
.lbtn-play::after, .lbtn-soon::after, .lbtn-dev::after { content: ''; position: absolute; inset: 0; z-index: 1; }
/* the title opens the game's page, above the play button stretched over the card */
.lcard-title { position: relative; z-index: 2; color: inherit; text-decoration: none; }
.lcard-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.lcard:hover .lbtn-play { filter: brightness(1.06); }
.lcard:hover .lbtn-play .ico { transform: translateX(3px); }
.lbtn-soon { background: #d9edf8; color: #2c6385; }
.lbtn-dev { background: #fbe2a2; color: #7a4f10; }
.lcard.is-soon .lcard-cover img { filter: saturate(.8); }

/* 8. PROFILE ------------------------------------------------------------- */

.page { padding-block: clamp(28px, 5vw, 56px); display: grid; gap: 22px; }
/* Grid children may shrink, so wide tables scroll inside .table-wrap instead of stretching the page. */
.page > *, .admin-grid > *, .admin-form > * { min-width: 0; }

.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-id h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; }
.profile-id p { margin: 4px 0 0; color: var(--ink-2); font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 6px; border-bottom: 1.5px dashed var(--line); padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 16px;
  font: 600 15px var(--fd); text-decoration: none; white-space: nowrap;
  color: var(--ink-2); background: var(--chip);
}
.tabs a .ico { width: 18px; height: 18px; }
.tabs a[aria-current="page"] { background: var(--green); color: #fff; }

.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-tile {
  display: grid; gap: 4px; align-content: start;
  padding: 16px 18px; border-radius: 20px;
  background: var(--card); border: 1.5px solid var(--line);
}
.stat-tile span { color: var(--ink-3); font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.stat-tile b { display: flex; align-items: center; gap: 8px; font: 600 21px/1.2 var(--fd); }
.stat-tile.is-live { border-color: rgba(74, 222, 128, .5); }
.stat-tile.is-live b { font-size: 17px; }

.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 22px; }
.panel-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.panel-danger { border-color: rgba(226, 87, 76, .45); }
.panel-danger h2 { color: var(--tulip); }

.save-row {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center;
  padding: 14px; border-radius: 20px; background: var(--paper); border: 1.5px solid var(--line);
}
.save-row + .save-row { margin-top: 12px; }

.save-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: visible; background: var(--chip); }
.save-thumb > img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.save-icon {
  position: absolute; right: -10px; bottom: -10px;
  width: 40px; height: 40px; border-radius: 12px; background: var(--card);
  display: grid; place-items: center;
}
.save-icon img { width: 22px; height: 22px; object-fit: contain; }

.save-body { min-width: 0; }
.save-body h3 { margin: 0 0 6px; font-size: 20px; }

.save-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.save-stats div { display: inline-flex; gap: 5px; padding: 3px 10px; border-radius: 10px; background: var(--chip); font-size: 12.5px; }
.save-stats dt { color: var(--ink-3); font-weight: 700; }
.save-stats dd { margin: 0; font-weight: 800; color: var(--ink); }

.save-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0; color: var(--ink-3); font-size: 13px; font-weight: 700; }
.save-meta .ico { color: var(--canal); }

.save-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.save-actions form { display: contents; }

.empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 30px 10px; }
.empty-state h3 { margin: 6px 0 0; font-size: 20px; }
.empty-state p { margin: 0; color: var(--ink-2); max-width: 42ch; font-weight: 600; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.mini-card {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center;
  padding: 10px; border-radius: 20px; text-decoration: none;
  background: var(--paper); border: 1.5px solid var(--line);
  transition: transform .15s, box-shadow .15s;
}
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini-card img { width: 84px; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 12px; }
.mini-card b { display: block; font: 600 17px var(--fd); }
.mini-card small { display: block; color: var(--ink-3); font-weight: 700; font-size: 12.5px; }

/* 8b. FRIENDS & ADMIN ---------------------------------------------------- */

.muted { color: var(--ink-3); }
.block { display: block; }

.menu-trigger { position: relative; }
.avatar-dot {
  position: absolute; left: 32px; top: 2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--tulip); box-shadow: 0 0 0 2px var(--bg);
}
.menu-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center; border-radius: 10px;
  background: var(--tulip); color: #fff; font: 800 11px var(--fb);
}
.avatar-muted { background: var(--chip); color: var(--ink-3); }

.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 260px; }

.panel-highlight { border-color: var(--honey); }

.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.person {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 18px;
  background: var(--paper); border: 1.5px solid var(--line);
}
section > .person + .person { margin-top: 10px; }
.person-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.person-body b { font: 600 16.5px var(--fd); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-body b a { text-decoration: none; }
.person-body small { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; font-weight: 700; }
.person-body small a { color: var(--canal-ink); font-weight: 800; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.person-actions form { display: contents; }

.admin-head { display: grid; gap: 6px; }
.admin-head h1 { margin: 0; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.1; }
.admin-badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 4px 10px; border-radius: 10px;
  background: var(--tulip-l); color: #a94a22; font: 800 12px var(--fb); letter-spacing: .04em; text-transform: uppercase;
}
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.admin-actions form { display: contents; }
.panel-head .admin-actions { margin-top: 0; }
.stat-tiles-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.live-line { display: flex; align-items: center; gap: 8px; color: var(--canal-ink) !important; }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 8px 10px; white-space: nowrap;
  color: var(--ink-3); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 1.5px solid var(--line);
}
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-weight: 700; color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--ink); }
.cell-user { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 220px; }
.cell-user > span { display: grid; gap: 1px; }
.cell-user b { color: var(--ink); font: 600 15px var(--fd); }
.cell-user small { color: var(--ink-3); font-size: 12.5px; }
.cell-icon { width: 30px; height: 30px; object-fit: contain; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .btn + .btn { margin-left: 6px; }

.pill {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  padding: 1px 8px; border-radius: 8px;
  background: var(--chip); color: var(--ink-2);
  font: 800 10.5px var(--fb); letter-spacing: .04em; text-transform: uppercase;
}
.pill-admin, .pill-new { background: var(--honey); color: var(--honey-ink); }
.pill-danger, .pill-dev { background: var(--tulip); color: #fff; }
.pill-live { background: var(--canal-l); color: var(--canal-ink); }
.table td .pill { margin-left: 0; }
.cell-user .pill { justify-self: start; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .field-control { flex: 1 1 260px; }
.filter-bar .input { min-height: 44px; }
.select { width: auto; min-width: 160px; padding-right: 12px; }
.textarea { min-height: 0; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.mono { font: 500 13px/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; }
.file { padding: 10px; min-height: 0; font-size: 13.5px; }

.admin-form { display: grid; gap: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.field-wide { grid-column: 1 / -1; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; min-height: 54px; align-items: center; }
.static-value { margin: 0; min-height: 54px; display: flex; align-items: center; gap: 8px; font: 600 16px var(--fd); }
.preview { border-radius: 12px; border: 1.5px solid var(--line); max-height: 120px; width: auto; object-fit: cover; }
.preview-icon { width: 48px; height: 48px; object-fit: contain; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.pager-info { color: var(--ink-3); font-weight: 800; font-size: 13.5px; }

/* 8b. PROFILE PAGES (Saves · Friends · Account) over a painted frame ----- */

body.profile-page { background: var(--bg) url(../images/ninef/profile-bg.webp) center top / cover no-repeat fixed; }
.profile-page .page { max-width: 1260px; gap: 18px; padding-top: clamp(18px, 2.4vw, 30px); }
.profile-page .panel {
  background: rgba(255, 251, 244, .95); border-color: rgba(235, 221, 198, .8); border-radius: 30px;
  box-shadow: 0 24px 50px -36px rgba(74, 47, 34, .55);
}

.pf-head {
  justify-self: start; width: min(100%, 620px);
  padding: clamp(20px, 2.2vw, 28px) clamp(20px, 2.4vw, 32px);
  border-radius: 30px; background: rgba(255, 251, 244, .95);
  box-shadow: 0 24px 50px -34px rgba(74, 47, 34, .55);
}
.pf-id { display: flex; align-items: center; gap: clamp(16px, 2vw, 24px); margin-bottom: 22px; }
.pf-avatar {
  position: relative; flex: none; width: clamp(96px, 9vw, 136px); aspect-ratio: 1;
  display: grid; place-items: center; border-radius: 30px; border: 5px solid #fff;
  background: linear-gradient(160deg, #a9c47a, #6f8e48); color: #fff;
  font: 700 clamp(34px, 3.4vw, 48px) var(--fd); text-shadow: 0 2px 6px rgba(40, 60, 20, .35);
  box-shadow: 0 16px 30px -18px rgba(74, 47, 34, .65);
}
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 25px; }
.pf-edit {
  position: absolute; right: -10px; bottom: -10px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink);
  box-shadow: 0 6px 14px -6px rgba(74, 47, 34, .55); transition: transform .15s;
}
.pf-edit:hover { transform: scale(1.06); }
.pf-who { min-width: 0; }
.pf-who h1 { margin: 0 0 6px; font: 700 clamp(30px, 3.4vw, 44px)/1.05 var(--fd); overflow-wrap: anywhere; }
.pf-email { margin: 0 0 8px; color: var(--ink-2); font: 600 clamp(15px, 1.2vw, 17px) var(--fd); overflow-wrap: anywhere; }
.pf-since { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font: 600 14.5px var(--fb); }

.pf-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-tabs a {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px; border-radius: 999px;
  background: #f3ebde; color: var(--ink); font: 600 16px var(--fd); text-decoration: none;
  transition: background .15s;
}
.pf-tabs a:hover { background: #ece0cc; }
.pf-tabs a[aria-current="page"] { background: var(--leaf); color: #fff; box-shadow: inset 0 -3px 0 var(--leaf-d); }
.pf-tabs .ico { width: 20px; height: 20px; }

.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pf-stat {
  display: flex; align-items: center; gap: 16px; min-width: 0;
  padding: 16px 18px; border-radius: 22px;
  background: rgba(255, 251, 244, .95); border: 1.5px solid rgba(235, 221, 198, .8);
  box-shadow: 0 18px 34px -30px rgba(74, 47, 34, .6);
}
.pf-stat > div { min-width: 0; }
.pf-stat-ico { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 18px; background: #f7e6d2; color: #b4552d; }
.pf-stat-ico .ico { width: 28px; height: 28px; }
.pf-stat span:not(.pf-stat-ico):not(.live-dot) { display: block; color: var(--ink-2); font: 600 14px var(--fb); }
.pf-stat b { display: flex; align-items: center; gap: 8px; font: 700 24px/1.2 var(--fd); color: var(--ink); }
.pf-stat .pf-stat-text { font-size: 16.5px; }
.pf-stat.is-live { border-color: rgba(74, 222, 128, .55); }

.pf-panel .panel-head h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 2.2vw, 30px); }
.pf-panel-ico { width: 34px; height: 34px; color: var(--leaf); flex: none; }
.pf-count { min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; border-radius: 14px; background: #f3ebde; font: 700 16px var(--fd); color: var(--ink); }

.profile-page .save-row { grid-template-columns: 220px minmax(0, 1fr) auto; padding: 12px 18px 12px 12px; border-radius: 22px; background: #fffdf9; border-color: rgba(235, 221, 198, .9); }
.profile-page .save-thumb { aspect-ratio: 2.4 / 1; }
.profile-page .save-body h3 { margin-bottom: 8px; font: 700 22px/1.15 var(--fd); }
.profile-page .save-stats div { padding: 4px 12px; border-radius: 10px; background: #f3ebde; font-size: 13.5px; }
.profile-page .save-meta { gap: 6px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.profile-page .save-meta + .save-meta { margin-top: 4px; }
.profile-page .save-meta .ico { color: var(--ink-2); }
.profile-page .save-actions .btn { min-height: 48px; padding: 0 22px; border-radius: 14px; font-size: 16.5px; }
.profile-page .save-actions .btn-green { background: var(--leaf); box-shadow: inset 0 -4px 0 var(--leaf-d); }

/* profile picture: <x-avatar> everywhere, the picker in Profile → Hesap */
.avatar-img { object-fit: cover; background: var(--chip); }
.avatar-img.avatar-muted { opacity: .7; }

.avatar-choices { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; border: 0; min-width: 0; }
.avatar-choice {
  position: relative; display: grid; justify-items: center; gap: 8px; width: 132px; padding: 12px 10px 10px;
  border-radius: 22px; border: 2px solid var(--line); background: #fffdf9; cursor: pointer;
  color: var(--ink-2); font: 600 14.5px var(--fd); text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.avatar-choice:hover { border-color: var(--line-strong); }
.avatar-choice input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-choice img, .avatar-plus { width: 104px; height: 104px; border-radius: 22px; object-fit: cover; }
.avatar-plus { display: grid; place-items: center; background: #f3ebde; color: var(--ink-2); }
.avatar-plus .ico { width: 30px; height: 30px; }
.avatar-choice:has(input:checked) { border-color: var(--leaf); color: var(--ink); box-shadow: 0 0 0 3px rgba(109, 155, 63, .2); }
.avatar-choice:has(input:checked)::after {
  content: ""; position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.avatar-choice:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 3px; }
#avatar .file { max-width: 420px; }

/* 8c. ABOUT ---------------------------------------------------------------- */

.ab-hero { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(380px, 30vw, 560px); display: flex; align-items: center; }
.ab-hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 45%; }
.ab-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 249, 240, .9) 0%, rgba(255, 249, 240, .62) 30%, rgba(255, 249, 240, 0) 56%);
}
.ab-hero-copy { width: 100%; padding-block: clamp(36px, 4vw, 56px); }
.ab-eyebrow { display: inline-block; color: var(--leaf-d); font: 800 14px var(--fb); letter-spacing: .14em; text-transform: uppercase; }
.ab-hero h1 { max-width: 11em; margin: 10px 0 16px; font: 700 clamp(40px, 4.6vw, 68px)/1.04 var(--fd); letter-spacing: -.01em; }
.ab-hero p { max-width: 30em; margin: 0 0 26px; color: var(--ink-2); font: 600 clamp(15.5px, 1.15vw, 18px)/1.6 var(--fb); }
.ab-cta { min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--leaf); color: #fff; box-shadow: inset 0 -4px 0 var(--leaf-d); font-size: 17px; }
.ab-cta:active { box-shadow: inset 0 -1px 0 var(--leaf-d); }
.ab-cta .ico { width: 18px; height: 18px; transition: transform .2s; }
.ab-cta:hover .ico { transform: translateX(3px); }

.ab-values-section { padding-block: clamp(28px, 3vw, 44px) 0; }
.ab-values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2vw, 30px); }
.ab-value { display: flex; align-items: flex-start; gap: 18px; }
.ab-value-ico { width: 76px; height: 76px; flex: none; display: grid; place-items: center; border-radius: 22px; background: #f3ebde; color: var(--ink); }
.ab-value-ico .ico { width: 34px; height: 34px; }
.ab-value h2 { margin: 6px 0 8px; font: 700 20px/1.2 var(--fd); }
.ab-value p { margin: 0; color: var(--ink-2); font: 600 14.5px/1.55 var(--fb); }

.ab-team-section { padding-top: clamp(28px, 3.4vw, 48px); }
.ab-team { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.ab-team-art { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; box-shadow: 0 26px 50px -36px rgba(74, 47, 34, .6); }
.ab-team-copy h2 { margin: 10px 0 18px; font: 700 clamp(30px, 3vw, 44px)/1.1 var(--fd); }
.ab-team-copy p { max-width: 34em; margin: 0 0 14px; color: var(--ink-2); font: 600 16px/1.65 var(--fb); }

.ab-numbers { margin: clamp(26px, 3vw, 40px) 0 0; padding: 20px 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 22px; background: #f6efe4; }
.ab-numbers > div { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico value" "ico label"; column-gap: 16px; align-items: center; padding: 6px clamp(14px, 2.2vw, 30px); }
.ab-numbers > div + div { border-left: 1.5px solid var(--line); }
.ab-numbers .ico { grid-area: ico; width: 40px; height: 40px; color: var(--ink); }
.ab-numbers dd { grid-area: value; margin: 0; font: 700 clamp(24px, 2.2vw, 30px)/1.1 var(--fd); color: var(--ink); }
.ab-numbers dt { grid-area: label; color: var(--ink-2); font: 600 14px/1.35 var(--fb); }

/* 9. AUTH ---------------------------------------------------------------- */

/* The form card over a painted scene (images/ninef/auth-login|register.webp). */
body.auth { background: var(--sky); }
/* full screen: the scene fills the window, its content stays in a centred column */
.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; }

.auth-scene {
  position: relative; isolation: isolate; overflow: hidden;
  flex: 1; width: 100%; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
  padding: calc(clamp(18px, 2.4vw, 32px) + env(safe-area-inset-top, 0px)) clamp(18px, 4vw, 64px) calc(clamp(18px, 2.2vw, 28px) + env(safe-area-inset-bottom, 0px));
  background: var(--sky);
}
/* (the art is a child too: it must keep covering the whole window) */
.auth-scene > :not(.auth-art) { width: 100%; max-width: 1360px; margin-inline: auto; }
.auth-art { position: absolute; inset: 0; z-index: -2; display: block; }
.auth-art img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.auth-scene-register .auth-art img { object-position: 0% 60%; }
/* desktop: the wide scenes (auth-*-wide.webp) — keep the boy & dog / the cabin on the left */
@media (min-width: 961px) {
  .auth-art img { object-position: 28% 55%; }
  .auth-scene-register .auth-art img { object-position: 20% 62%; }
}
/* cream wash behind the words on the left, a darker one under the feature row */
.auth-scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 249, 240, .78) 0%, rgba(255, 249, 240, .5) 26%, rgba(255, 249, 240, 0) 50%),
    linear-gradient(0deg, rgba(36, 24, 12, .62) 0%, rgba(36, 24, 12, 0) 24%);
}

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top .brand-logo { height: clamp(44px, 4vw, 58px); }
.auth-top-right { display: flex; align-items: center; gap: 10px; }
.auth-switch {
  display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 16px; border-radius: 999px;
  background: rgba(255, 250, 242, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink-2); font: 700 14px var(--fb);
}
.auth-switch a {
  padding: 9px 20px; border-radius: 999px; background: #fff; color: var(--ink);
  font: 600 15px var(--fd); text-decoration: none; box-shadow: 0 6px 16px -10px rgba(74, 47, 34, .5);
  transition: transform .15s;
}
.auth-switch a:hover { transform: translateY(-1px); }
.auth-top .seg { background: rgba(255, 250, 242, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.auth-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(20px, 4vw, 64px); align-items: center; }
.auth-intro { align-self: start; padding-top: clamp(16px, 5vh, 70px); }
.auth-title {
  max-width: 9.5em; margin: 0 0 16px;
  font: 700 clamp(38px, 4.4vw, 62px)/1.04 var(--fd); letter-spacing: -.01em; color: var(--ink);
  text-shadow: 0 2px 20px rgba(255, 249, 240, .7);
}
.auth-text { max-width: 25em; margin: 0; color: var(--ink-2); font: 600 clamp(15px, 1.1vw, 17px)/1.55 var(--fb); text-shadow: 0 1px 12px rgba(255, 249, 240, .9); }

.auth-card {
  position: relative; width: 100%; justify-self: end;
  padding: clamp(22px, 2.6vw, 34px);
  background: rgba(255, 252, 246, .96); border-radius: 26px;
  box-shadow: 0 30px 60px -32px rgba(40, 25, 10, .6);
}
.auth-head { margin-bottom: 20px; }
.auth-head h1 { margin: 0 0 8px; font: 700 clamp(30px, 2.6vw, 38px)/1.05 var(--fd); letter-spacing: -.01em; }
.auth-head p { margin: 0; max-width: 34ch; color: var(--ink-2); font-size: 15.5px; font-weight: 600; }
.auth-card .form { gap: 14px; }
.auth-card .input { min-height: 52px; background: #fff; }
.auth-card .field-hint { padding-left: 16px; }
.auth-card .check input:checked { background: var(--leaf); border-color: var(--leaf); }
.auth-card .check input::after { width: 5px; height: 9px; margin-top: -2px; border-radius: 0; background: none; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) scale(0); }
.auth-card .check input:checked::after { transform: rotate(45deg) scale(1); }
.auth-forgot { color: var(--leaf); text-decoration: underline; text-underline-offset: 3px; }
.auth-terms { align-items: flex-start; line-height: 1.45; }
.auth-terms input { margin-top: 1px; flex: none; }
.auth-terms a { color: var(--leaf); font-weight: 800; text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }
.auth-submit { min-height: 54px; margin-top: 4px; border-radius: 16px; background: var(--leaf); color: #fff; box-shadow: inset 0 -4px 0 var(--leaf-d); font-size: 17.5px; }
.auth-submit:active { box-shadow: inset 0 -1px 0 var(--leaf-d); }
.auth-submit .ico { width: 18px; height: 18px; transition: transform .2s; }
.auth-submit:hover .ico { transform: translateX(3px); }

.auth-after {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px;
  border-top: 1.5px dashed var(--line);
  color: var(--ink-2); font-size: 13.5px; font-weight: 700;
}

.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px clamp(20px, 3vw, 40px); color: #fff; font: 600 15.5px var(--fd); text-shadow: 0 2px 10px rgba(20, 12, 4, .55); }
.auth-features li { display: flex; align-items: center; gap: 10px; }
.auth-features .ico { width: 24px; height: 24px; filter: drop-shadow(0 2px 6px rgba(20, 12, 4, .45)); }

/* bottom row: features on the left, © and links on the right, over the dark wash */
.auth-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; }
.auth-foot { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; color: rgba(255, 255, 255, .82); font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 6px rgba(20, 12, 4, .6); }
.auth-foot a { color: #fff; text-decoration: none; }
.auth-foot-links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.auth-foot a:hover { text-decoration: underline; }

/* "Google ile devam et": white button with the four-colour G (Google's sign-in branding) */
.btn-google { min-height: 44px; padding: 0 18px; background: #fff; color: #1f1f1f; box-shadow: inset 0 -4px 0 #d6d1cb; font-size: 15.5px; }
.btn-google:active { box-shadow: inset 0 -1px 0 #d6d1cb; }
.btn-google .g-logo { width: 18px; height: 18px; flex: none; }
.auth-card .notice + .btn-google { margin-top: 14px; }
.auth-card .btn-google { min-height: 50px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line), 0 8px 18px -14px rgba(74, 47, 34, .6); }
.auth-card .btn-google:active { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-3); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line); }
.account-google { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 7px 12px; border-radius: 12px; background: #fff; color: #1f1f1f; font-size: 13px; font-weight: 700; }
.account-google .g-logo { width: 16px; height: 16px; }

.perks { list-style: none; padding: 0; margin: -6px 0 22px; display: grid; gap: 8px; }
.perks li { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.perks .ico { color: var(--canal); width: 18px; height: 18px; }

.error-card .ctas { margin-top: 4px; }
.error-code {
  display: inline-grid; place-items: center;
  height: 44px; padding: 0 18px; border-radius: 22px;
  background: var(--tulip); color: #fff;
  font: 800 20px var(--fd); letter-spacing: -.01em;
}

/* 11. OVERLAYS: toast, dialog ------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 11px 10px 11px 15px; border-radius: 18px;
  background: var(--glass); color: var(--on-glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px -10px rgba(74, 47, 34, .4);
  font-weight: 700; font-size: 14px;
  animation: toast-in .3s ease;
}
.toast > .ico { color: var(--canal-d); }
.toast-x { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--on-glass-2); }
.toast-x:hover { background: rgba(74, 47, 34, .07); }
.toast.is-leaving { opacity: 0; transform: translate(-50%, 10px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

.dialog {
  width: min(100% - 32px, 460px); padding: clamp(22px, 5vw, 32px);
  border: 1.5px solid var(--line); border-radius: 28px;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(74, 47, 34, .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog h2 { margin: 0; font-size: 24px; line-height: 1.15; }
.dialog p { margin: 0; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Save backups (profile) — closed by default, list loads on open --------- */

.backups { grid-column: 1 / -1; border-top: 1.5px dashed var(--line); padding-top: 12px; margin-top: -4px; }
.backups-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 12px 0 10px; border-radius: 14px;
  background: transparent; color: var(--ink-2); font: 700 14px var(--fd); cursor: pointer;
  transition: background .15s, color .15s;
}
.backups-toggle:hover, .backups.is-open .backups-toggle { background: var(--chip); color: var(--ink); }
.backups-toggle .ico { width: 18px; height: 18px; color: var(--canal-d); }
.backups-count {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  display: inline-grid; place-items: center;
  background: var(--canal-l); color: var(--canal-ink); font: 800 12px var(--fb);
}
.backups-chev { transition: transform .2s; color: var(--ink-3) !important; }
.backups.is-open .backups-chev { transform: rotate(180deg); }

.backups-panel { padding: 8px 2px 2px; animation: backups-in .22s ease; }
@keyframes backups-in { from { opacity: 0; transform: translateY(-4px); } }
.backups-note { margin: 0 0 10px; color: var(--ink-3); font-size: 13px; font-weight: 700; }

.backups-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.bk-item {
  position: relative; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line);
}
.bk-item:not(:last-child)::after {
  content: ""; position: absolute; left: 30px; top: 48px; bottom: -10px; width: 2px;
  background: var(--line); border-radius: 1px;
}
.bk-dot {
  position: relative; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  background: var(--chip); color: var(--ink-2);
}
.bk-dot > span { display: grid; place-items: center; }
.bk-dot .ico { width: 18px; height: 18px; }
.bk-new_game .bk-dot { background: var(--canal-l); color: var(--canal-ink); }
.bk-franchise .bk-dot { background: rgba(243, 178, 77, .22); color: var(--honey-d); }
.bk-deleted .bk-dot { background: var(--tulip-l); color: var(--tulip-d); }
.bk-main { min-width: 0; display: grid; gap: 3px; }
.bk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-head b { font: 700 15px var(--fd); color: var(--ink); }
.bk-latest { padding: 1px 8px; border-radius: 8px; background: var(--honey); color: var(--honey-ink); font: 800 11px var(--fb); text-transform: uppercase; letter-spacing: .04em; }
.bk-when { color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.bk-stats { margin: 4px 0 0; }
.bk-stats div { padding: 2px 8px; font-size: 12px; }

.backups-loading { display: grid; gap: 8px; }
.bk-skeleton { height: 60px; border-radius: 16px; background: linear-gradient(90deg, var(--chip) 0%, var(--paper) 50%, var(--chip) 100%); background-size: 200% 100%; animation: bk-shimmer 1.1s linear infinite; }
@keyframes bk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.backups-error, .backups-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; color: var(--ink-2); font-weight: 700; font-size: 14px; }

.dialog-hex {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 4px;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  background: var(--canal-l); color: var(--canal-ink);
}
.dialog-hex .ico { width: 24px; height: 24px; }
.dialog .dialog-hint { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--chip); font-size: 13px; }
.dialog .dialog-hint .ico { color: var(--canal-d); flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 560px) {
  .save-row { grid-template-columns: minmax(0, 1fr); }
  .bk-item { grid-template-columns: 34px minmax(0, 1fr); }
  .bk-restore-btn { grid-column: 2; justify-self: start; }
  .bk-item:not(:last-child)::after { left: 28px; }
}

/* 12. RESPONSIVE --------------------------------------------------------- */

@media (max-width: 1200px) {
  .bar-nav { gap: 2px; }
}

@media (max-width: 1100px) {
  .bar { min-height: 76px; }
  .bar-cta { padding: 11px 16px; }
  .bar-social, .hide-md { display: none !important; }
  .bar-discord { padding: 0 16px; }
}

@media (max-width: 880px) {
  .maker { grid-template-columns: 1fr; }
  .maker-art { min-height: 0; height: 240px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%); mask-image: linear-gradient(to bottom, transparent 0, #000 26%); }
  .about { grid-template-columns: 1fr; }
  .save-row { grid-template-columns: 120px 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tiles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-grid, .form-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-wrap { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; }
  .save-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Narrow bars: the Discord button goes ("Community" still links there). */
@media (max-width: 820px) {
  .bar { min-height: 66px; }
  .bar-discord { display: none; }
  .bar-nav a { font-size: 14px; padding-inline: 4px; }
}

@media (max-width: 720px) {
  .menu-name { display: none; }
  .menu-trigger { padding-right: 6px; }
}

@media (max-width: 600px) {
  .hide-sm { display: none !important; }
  .show-sm { display: inline; }
  .bar-nav { margin-left: 4px; }
  .bar-nav a, .bar-link { padding: 8px 6px; font-size: 15px; }
  .bar-cta { padding: 10px 14px; }
  .brand-logo { height: 42px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; height: 40px; padding: 0 14px; font-size: 14px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .shead-count { display: none; }
  .site-footer { padding-top: 150px; }
  .ctas .btn { flex: 1; }
  .profile-head { gap: 14px; }
  .avatar-lg { width: 60px; height: 66px; font-size: 21px; }
  .save-row { grid-template-columns: 1fr; }
  .save-thumb { max-width: 220px; }
  .save-actions .btn { flex: 1; }
  .stat-tiles-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .games-sort { width: 100%; }
  .games-sort .select { flex: 1; }
  .tabs a { padding: 8px 12px; font-size: 14px; gap: 6px; }
  .person { flex-wrap: wrap; }
  .person-actions { width: 100%; justify-content: flex-start; }
  .auth-foot { flex-direction: column; align-items: center; }
  .footer-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hide-xs { display: none !important; }
  .bar-right { gap: 6px; }
  .seg a { padding: 6px 8px; }
  .grid { grid-template-columns: 1fr; }
}

/* 320–360px phones: the logo mark alone is enough. */
@media (max-width: 360px) {
  .bar .brand-logo { height: 38px; }
}

/* home, after the reference: fewer columns, then words, island, cards that swipe */
@media (max-width: 1499px) {
  .side-deco { display: none; }
}
@media (max-width: 1300px) {
  .studio-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .games-row .grid { --cols: 3.2; }
}
@media (max-width: 880px) {
  .hero-world { display: flex; flex-direction: column; min-height: 0; padding-top: 70px; }
  .hero { width: 100%; padding-block: 10px 0; }
  .hero-paper { margin-left: -16px; padding-left: 22px; }
  .hero-art { order: 2; position: relative; top: auto; right: auto; width: auto; margin: -8px 0 0; }
  .hero-art img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 82%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 82%, transparent 100%); }
  .section-games { margin-top: -34px; }
  .games-row .grid { --cols: 2.2; }
  .studio-row { grid-template-columns: 1fr; }
  .studio-card, .desk-card, .join-card { margin-top: 0; }
  .bird-1 { left: 70%; }
  .bird-2 { left: 82%; }
}
@media (max-width: 600px) {
  .hero .ctas { gap: 10px; }
  .btn-play, .btn-soft { flex: 1; padding-inline: 12px; }
  .games-row .grid { --cols: 1.15; }
  .studio-card { grid-template-columns: 1fr; }
  .studio-art { height: 190px; margin-top: 0; border-radius: 0 0 20px 20px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%); mask-image: linear-gradient(to bottom, transparent 0, #000 30%); }
  .studio-copy { padding-right: 18px; }
  .notes { grid-template-columns: repeat(3, minmax(150px, 1fr)); overflow-x: auto; padding: 8px 2px 4px; scrollbar-width: none; }
  .home .site-footer { margin-top: -40px; padding-top: 80px; }
}

/* /oyunlar: below 1100px the sidebar moves above the cards, its options as small pills */
@media (max-width: 1100px) {
  .lib-topbar { flex-wrap: wrap; }
  .lib-topbar .chips { flex-basis: 100%; }
  .lib-sort { margin-left: auto; }
  .lib-body { grid-template-columns: minmax(0, 1fr); }
  .lib-side { position: static; padding: 14px 14px 4px; }
  .lib-search { margin-bottom: 12px; }
  .lib-group { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
  .lib-group + .lib-group { padding-top: 10px; }
  .lib-group legend { margin-bottom: 2px; font-size: 15px; }
  .lib-opt, .lib-opt-radio { display: inline-flex; gap: 7px; padding: 6px 10px; border-radius: 12px; background: var(--bg); font-size: 13.5px; }
  .lib-opt input { width: 17px; height: 17px; }
  .lib-opt-ico { width: 16px; height: 16px; }
}
@media (max-width: 600px) {
  .lib-hero { height: 430px; }
  .lib-hero::before { background: linear-gradient(0deg, rgba(34, 24, 12, .78) 0%, rgba(34, 24, 12, .45) 48%, rgba(34, 24, 12, 0) 75%); }
  .lib-hero-art { object-position: 72% 50%; }
  .lib-hero-copy { justify-content: flex-end; padding-bottom: 28px; }
  .lib-hero-copy p { -webkit-line-clamp: 3; font-size: 15px; }
  .lib-btn-play, .lib-btn-glass { min-height: 48px; padding-inline: 16px; font-size: 16px; }
  .lib-topbar { margin-bottom: 14px; }
  .lib-sort { margin-left: 0; }
  .lib-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-group legend { grid-column: 1 / -1; }
  .lib-opt, .lib-opt-radio { display: flex; padding: 7px 8px; font-size: 12.5px; line-height: 1.2; }
  .lib-count { min-width: 20px; height: 18px; margin-left: auto; padding: 0 5px; font-size: 11px; }
}

/* profile & about: fewer columns, then stacked */
@media (max-width: 1100px) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .ab-numbers > div:nth-child(3) { border-left: 0; }
}
@media (max-width: 880px) {
  /* phones: the painted frame only at the top, no fixed background */
  body.profile-page { background: var(--bg) url(../images/ninef/profile-bg.webp) center top / 100% auto no-repeat scroll; }
  .profile-page .save-row { grid-template-columns: 160px minmax(0, 1fr); }
  .ab-team { grid-template-columns: minmax(0, 1fr); }
  .ab-hero { align-items: flex-start; }
  .ab-hero-art { object-position: 78% 50%; }
  .ab-hero::before { background: linear-gradient(180deg, rgba(255, 249, 240, .9) 0%, rgba(255, 249, 240, .65) 45%, rgba(255, 249, 240, 0) 75%); }
}
@media (max-width: 600px) {
  .pf-head { padding: 18px 16px; border-radius: 24px; }
  .pf-id { align-items: flex-start; }
  .pf-avatar { width: 84px; border-radius: 22px; border-width: 4px; font-size: 30px; }
  .pf-edit { width: 34px; height: 34px; right: -8px; bottom: -8px; }
  .pf-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding-inline: 4px; }
  .pf-tabs::-webkit-scrollbar { display: none; }
  .pf-tabs a { flex: none; height: 42px; padding: 0 16px; font-size: 15px; }
  .pf-stats { gap: 10px; }
  .pf-stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .pf-stat-ico { width: 44px; height: 44px; border-radius: 14px; }
  .pf-stat-ico .ico { width: 22px; height: 22px; }
  .pf-stat b { font-size: 20px; }
  .pf-stat .pf-stat-text { font-size: 14.5px; }
  .profile-page .save-row { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .profile-page .save-actions .btn { flex: 1; }
  /* phones: the art as a strip on top, the words below it on plain cream */
  .ab-hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .ab-hero::before { display: none; }
  .ab-hero-copy { padding-block: 26px 22px; }
  .ab-hero-art { position: relative; inset: auto; z-index: 0; height: 230px; object-position: 82% 50%; }
  .ab-values { grid-template-columns: minmax(0, 1fr); }
  .ab-value-ico { width: 60px; height: 60px; border-radius: 18px; }
  .ab-value-ico .ico { width: 28px; height: 28px; }
  .ab-numbers { padding: 16px 4px; }
  .ab-numbers > div { column-gap: 10px; padding-inline: 12px; }
  .ab-numbers .ico { width: 28px; height: 28px; }
}

/* login / register on short laptop screens: a tighter card so it fits without scrolling */
@media (min-width: 961px) and (max-height: 920px) {
  .auth-card { padding-block: 20px; }
  .auth-head { margin-bottom: 14px; }
  .auth-head h1 { font-size: 32px; }
  .auth-card .form { gap: 10px; }
  .auth-card .input { min-height: 46px; }
  .auth-card .btn-google { min-height: 46px; }
  .auth-or { margin: 12px 0; }
  .auth-submit { min-height: 50px; }
}

/* login / register: the words go above the card, then everything tightens on phones */
@media (max-width: 960px) {
  .auth-scene { gap: 16px; }
  .auth-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .auth-intro { padding-top: 4px; }
  .auth-card { justify-self: center; max-width: 520px; }
  .auth-scene::before {
    background:
      linear-gradient(180deg, rgba(255, 249, 240, .82) 0%, rgba(255, 249, 240, .4) 28%, rgba(255, 249, 240, 0) 46%),
      linear-gradient(0deg, rgba(36, 24, 12, .62) 0%, rgba(36, 24, 12, 0) 16%);
  }
  .auth-bottom { flex-direction: column; align-items: center; }
  .auth-features, .auth-foot { justify-content: center; text-align: center; }
}
@media (max-width: 600px) {
  .auth-scene { padding: calc(14px + env(safe-area-inset-top, 0px)) 12px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .auth-switch { padding: 3px; }
  .auth-switch > span { display: none; }
  .auth-switch a { padding: 8px 16px; font-size: 14px; }
  .auth-intro { padding-inline: 4px; }
  .auth-title { margin-bottom: 10px; font-size: 34px; }
  .auth-text { font-size: 14.5px; }
  .auth-card { padding: 22px 16px 20px; border-radius: 22px; }
  .auth-features { gap: 10px 18px; font-size: 14px; }
  .auth-features .ico { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* 13. GAME PAGE · NEWS · BADGES · PLAYER ----------------------------------- */

/* /oyunlar/{game}: the library hero, then about · screenshots · scores · news */
.gp-back { display: inline-flex; align-items: center; gap: 6px; color: inherit; font: 700 14px var(--fb); text-decoration: none; opacity: .92; }
.gp-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.lib-hero-copy .gp-back { color: #fff; text-shadow: 0 2px 8px rgba(20, 12, 4, .45); }
.lib-hero-copy .ctas form { display: contents; }
.lib-hero-copy .ctas .lib-flag { min-height: 52px; padding-inline: 18px; }
.gp-body { max-width: 1260px; }
.gp-about { display: grid; gap: 14px; }
.gp-about h2, .gp-section h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 clamp(22px, 2vw, 28px)/1.1 var(--fd); }
.gp-text { margin: 0; max-width: 70ch; color: var(--ink-2); font: 600 16px/1.6 var(--fb); }
.gp-about .lib-facts { margin: 0; }
.gp-section { display: grid; gap: 12px; }
.gp-section > .muted { margin: -4px 0 0; }
.gp-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gp-shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 1.5px solid var(--line); }
.gp-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.gp-board h3 { margin: 0 0 10px; font: 700 17px var(--fd); }
.gp-ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gp-ranks li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; }
.gp-ranks li:nth-child(-n+3) .gp-rank { color: var(--honey-d); }
.gp-ranks li.is-me { background: var(--canal-l); }
.gp-rank { font: 800 15px var(--fd); color: var(--ink-3); text-align: center; }
.gp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.gp-score { font: 700 14.5px ui-monospace, Consolas, monospace; color: var(--ink); }

/* /haberler, the news cards on game pages, one post */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
.news-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-card-art { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--chip); color: #a5623a; }
.news-card-art img { width: 100%; height: 100%; object-fit: cover; }
.news-card-art .ico { width: 42px; height: 42px; }
.news-card-body { display: grid; gap: 6px; padding: 12px 14px 16px; }
.news-card time, .news-article time { color: var(--ink-3); font: 700 12.5px var(--fb); }
.news-card h3 { margin: 0; font: 700 18px/1.2 var(--fd); }
.news-card p { margin: 0; color: var(--ink-2); font: 600 14px/1.5 var(--fb); }
.news-post { max-width: 900px; }
.news-article { display: grid; gap: 16px; }
.news-article header { display: grid; gap: 8px; justify-items: start; }
.news-article h1 { margin: 0; font: 700 clamp(28px, 3.4vw, 44px)/1.1 var(--fd); }
.news-article .ltag { text-decoration: none; }
.news-article-art { width: 100%; height: auto; border-radius: 16px; }
.news-article .prose { max-width: 72ch; padding: 0; border: 0; background: none; }
.news-article .prose img { max-width: 100%; height: auto; border-radius: 12px; }

/* home: "From our desk" is back when there are posts (the notes are links now) */
.studio-row.has-desk { grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr) minmax(0, .68fr); }
a.note { display: block; color: inherit; text-decoration: none; }
a.note:hover h3 { text-decoration: underline; text-underline-offset: 2px; }

/* badges: earned in colour, the rest greyed out with how to get them */
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-item { display: grid; justify-items: center; gap: 4px; padding: 14px 10px; border-radius: 16px; border: 1.5px dashed var(--line-strong); text-align: center; color: var(--ink-3); }
.badge-item b { font: 700 15px var(--fd); }
.badge-item small { font: 600 12.5px/1.35 var(--fb); }
.badge-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--bg-2); }
.badge-ico .ico { width: 22px; height: 22px; }
.badge-item.is-earned { border-style: solid; border-color: rgba(243, 178, 77, .55); background: rgba(246, 203, 114, .14); color: var(--ink); }
.badge-item.is-earned .badge-ico { background: var(--honey); color: #fff; box-shadow: inset 0 -3px 0 var(--honey-d); }
.pf-sub { margin: 22px 0 10px; font: 700 18px var(--fd); }

/* a friend's profile */
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { text-decoration: underline; text-underline-offset: 2px; }
a.player-game { color: inherit; text-decoration: none; }
.profile-page a.player-game { grid-template-columns: 160px minmax(0, 1fr); }
.player-game h3 { margin: 0 0 4px; }
.player-game p { margin: 0; }

.admin-thumb { display: block; width: 240px; height: auto; margin-bottom: 8px; border-radius: 10px; }

@media (max-width: 1300px) {
  .studio-row.has-desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .studio-row.has-desk { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .profile-page a.player-game { grid-template-columns: 96px minmax(0, 1fr); }
  .gp-shots { grid-template-columns: 1fr; }
}
