/* Çayhane rule pages (apps/site/public/kurallar/*.html): the home page's colours, fonts and buttons, made for reading.
   Plain HTML that search engines read as it is; no script needed to show anything. */
@font-face { font-family: "Baloo 2"; src: url("Baloo2-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("Baloo2-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --navy: #0A1832; --deep: #060F22; --panel: rgba(16, 36, 74, 0.72); --line: rgba(245, 192, 74, 0.28);
  --gold: #F5C04A; --gold-2: #FFDF8A; --cream: #FFF4DA; --text: #E7ECF7; --muted: #A9B6D3; --red: #C8202F;
  --gutter: 16px;
  --head: "Baloo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.mobile .web-only { display: none !important; }
html:not(.mobile) .phone-only { display: none !important; }
body {
  margin: 0; color: var(--text); overflow-x: hidden;
  background: radial-gradient(90% 50% at 50% 0%, rgba(29, 69, 144, .55), transparent 70%), var(--deep);
  font: 400 17px/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(1040px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* header (as the home page) */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(6, 15, 34, 0.96), rgba(6, 15, 34, 0.82));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 192, 74, 0.14);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
header.top .brand img { height: 30px; width: auto; }
header.top nav { display: flex; gap: 4px; align-items: center; font: 600 16px/1 var(--head); }
header.top nav a { text-decoration: none; color: var(--muted); padding: 8px 10px; border-radius: 10px; }
header.top nav a:hover, header.top nav a[aria-current="page"] { color: var(--cream); background: rgba(255,255,255,0.06); }
header.top nav a.cta { color: #3A1E00; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }

/* breadcrumb */
.crumbs { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cream); }

/* hero */
.intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(18px, 4vw, 44px); align-items: center; padding: 18px 0 8px; }
h1, h2, h3 { font-family: var(--head); color: var(--cream); line-height: 1.12; }
h1 { font-weight: 800; font-size: clamp(32px, 5vw, 50px); margin: 6px 0 10px; letter-spacing: -.3px; }
h1 .gold { color: var(--gold); }
.intro.single { grid-template-columns: minmax(0, 1fr); }
.intro.single .lead { max-width: 74ch; }
.lead { font-size: clamp(17px, 1.8vw, 19px); margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.facts li { font: 600 15px/1 var(--head); color: var(--gold-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px 6px; background: rgba(16, 36, 74, .5); }
.shot { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 4px rgba(245,192,74,.25); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption { font-size: 14px; color: var(--muted); padding: 8px 12px; background: rgba(6, 15, 34, .85); }

/* store buttons (as the home page) */
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; text-align: left; font-family: var(--head);
  min-height: 52px; padding: 6px 16px 6px 12px; border-radius: 16px;
  background: #0B0F19; color: #fff; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 10px 26px rgba(0,0,0,.35);
  transition: transform .15s ease, border-color .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); border-color: rgba(255,255,255,.5); }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn small { display: block; font-size: 12px; line-height: 1.1; color: #C9D2E6; font-weight: 600; }
.btn strong { display: block; font-size: 17px; line-height: 1.15; font-weight: 800; }
.btn.web { background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #D99A1E); color: #3A1E00; border-color: rgba(255,255,255,.5); }
.btn.web:hover { color: #3A1E00; }
.btn.web small { color: #6A3E05; }

/* contents */
.toc { margin: 28px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.toc h2 { font-size: 20px; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 28px; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--gold-2); text-decoration: underline; }

/* the rules text */
article { padding: 8px 0 12px; }
article section { padding: 26px 0 4px; scroll-margin-top: 72px; }
article h2 { font-size: clamp(24px, 3.2vw, 32px); margin: 0 0 10px; }
article h2::before { content: ""; display: inline-block; width: 6px; height: .8em; margin-right: 10px; border-radius: 3px; background: var(--gold); vertical-align: -1px; }
article h3 { font-size: clamp(19px, 2.2vw, 22px); margin: 20px 0 6px; color: var(--gold-2); }
article p, article li { max-width: 74ch; }
article p { margin: 0 0 12px; }
article ul, article ol { margin: 0 0 12px; padding-left: 22px; }
article li { margin: 4px 0; }
article strong { color: var(--cream); }
.note { border-left: 4px solid var(--gold); background: rgba(245, 192, 74, .08); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 4px 0 14px; max-width: 74ch; }
.note.fire { border-left-color: #FF6A2B; background: rgba(255, 106, 43, .1); }
.table-wrap { overflow-x: auto; margin: 4px 0 14px; max-width: 100%; }
table { border-collapse: collapse; min-width: 420px; width: 100%; max-width: 760px; font-size: 16px; }
caption { text-align: left; color: var(--muted); font-size: 14px; padding: 0 0 6px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.1); vertical-align: top; }
thead th { font: 800 15px/1.2 var(--head); color: var(--gold-2); background: rgba(16, 36, 74, .8); }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.025); }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 14px; background: rgba(16, 36, 74, .45); margin: 0 0 10px; max-width: 820px; }
.faq summary { cursor: pointer; list-style: none; padding: 12px 44px 12px 16px; position: relative; font: 800 18px/1.3 var(--head); color: var(--cream); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; translate: 0 -50%; font-size: 24px; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 16px 14px; }

/* closing band */
.band { text-align: center; border-radius: 26px; padding: clamp(28px, 5vw, 48px) var(--gutter); margin: 34px 0 10px; border: 1px solid var(--line);
  background: radial-gradient(70% 90% at 50% 0%, rgba(200,32,47,.42), transparent 70%), var(--navy); }
.band img.cup { width: 96px; margin: 0 auto 4px; }
.band h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 6px; }
.band p { color: var(--muted); margin: 0 auto; max-width: 560px; }
.band .ctas { justify-content: center; }

/* the other games */
.more-title { font-size: clamp(22px, 3vw, 28px); margin: 34px 0 0; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 26px 0 8px; padding: 0; list-style: none; }
.games a { display: block; height: 100%; text-decoration: none; color: var(--text); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); transition: transform .15s ease, border-color .15s ease; }
.games a:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--text); }
.games img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.games span { display: block; padding: 10px 14px 12px; font-size: 15px; }
.games b { display: block; font: 800 19px/1.2 var(--head); color: var(--cream); margin-bottom: 2px; }
.games .here { pointer-events: none; opacity: .55; }

/* score calculators (101-okey-puan-hesaplama/, batak-puan-hesaplama/): the same panel, inputs in the site's colours */
.calc { margin: 28px 0 0; padding: clamp(14px, 3vw, 22px); border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.calc h2 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 4px; }
.calc h3 { font-size: 19px; margin: 18px 0 8px; color: var(--gold-2); }
.calc .hint { color: var(--muted); font-size: 15px; margin: 2px 0 10px; }
.calc fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.calc legend { font: 800 16px/1.3 var(--head); color: var(--cream); padding: 0; margin: 0 0 6px; }
.calc label { font-size: 15px; color: var(--text); }
.calc input[type="text"], .calc input[type="number"], .calc select {
  font: 500 17px/1.2 var(--body); color: var(--cream); background: rgba(6, 15, 34, .75);
  border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 9px 10px; min-height: 44px; width: 100%;
}
.calc input:focus-visible, .calc select:focus-visible { border-color: var(--gold); }
.calc fieldset > select { max-width: 360px; }
.calc input[type="checkbox"], .calc input[type="radio"] { width: 20px; height: 20px; accent-color: var(--gold); vertical-align: -4px; margin: 0 6px 0 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6,15,34,.5); cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--gold); background: rgba(245,192,74,.14); color: var(--cream); }
.names { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.names label span, .row-fields label span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 3px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; }
.checks label { display: inline-flex; align-items: center; min-height: 44px; }
.rows { display: grid; gap: 10px; }
.row { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px 12px; background: rgba(6,15,34,.35); }
.row.is-winner { border-color: var(--gold); }
.row b.who { display: block; font: 800 17px/1.2 var(--head); color: var(--cream); margin: 0 0 6px; }
.row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.row .won { color: var(--gold-2); font-size: 15px; margin: 0; }
.calc .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.calc button {
  font: 800 17px/1 var(--head); min-height: 48px; padding: 10px 18px; border-radius: 14px; cursor: pointer;
  color: #3A1E00; background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #D99A1E); border: 1px solid rgba(255,255,255,.5);
}
.calc button.ghost { color: var(--cream); background: transparent; border-color: rgba(255,255,255,.28); }
.calc button:disabled { opacity: .45; cursor: default; }
.calc .errors { color: #FFB4B4; margin: 10px 0 0; padding: 0; list-style: none; }
.calc .errors:empty { display: none; }
.calc .preview { margin: 10px 0 0; color: var(--gold-2); }
.sheet td.num, .sheet th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet tfoot td { font-weight: 800; color: var(--cream); border-top: 2px solid var(--line); }
.sheet .lead-cell { color: var(--gold); }
.sheet small { color: var(--muted); font-weight: 400; }
.status { font: 800 18px/1.3 var(--head); color: var(--gold-2); margin: 10px 0 0; }
.calc .privacy { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* glossaries (kurallar/okey-terimleri.html, kurallar/tavla-terimleri.html) */
.terms { margin: 0; max-width: 820px; }
.terms dt { font: 800 20px/1.25 var(--head); color: var(--cream); margin: 18px 0 4px; scroll-margin-top: 72px; }
.terms dd { margin: 0 0 6px; max-width: 74ch; }
.terms dd .see { display: inline-block; font-size: 15px; margin-left: 4px; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.letters a { display: inline-block; min-width: 40px; text-align: center; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font: 800 16px/1.2 var(--head); }

/* one definition sentence on every page (owner 2026-11-25) */
footer .def { flex-basis: 100%; margin: 0 0 4px; color: var(--muted); }

@media print {
  header.top, footer, .ctas, .band, .games, .more-title, .crumbs, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .calc { border: 0; background: none; padding: 0; }
  .sheet th, .sheet td, .sheet tfoot td { color: #000; background: none !important; }
}

footer { margin-top: 30px; padding: 26px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; border-top: 1px solid rgba(255,255,255,.06); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--cream); }

@media (max-width: 820px) {
  .intro { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  header.top nav a:not(.cta):not(.keep) { display: none; }
  .btn { width: 100%; justify-content: center; }
  .toc ol { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .games a { transition: none; }
}
