/* Game Zone tools (index list, matka calculator, dream / birthday / rashi
   numbers). Loaded after site.css on those pages only, through the meta
   'css' => ['css/tools.css']. Every selector here is prefixed tl- so nothing
   collides with the main stylesheet; colours come from the :root tokens in
   site.css so a colour theme recolours these pages too. */

/* ---- /games index: one card per group, one row per link ---- */
.tl-list { border-color: var(--brd-blue); }
.tl-item { display: block; padding: 10px 12px; border-bottom: 2px solid #ff0026; text-decoration: none; color: var(--ink); background: #fff; }
.tl-item:nth-child(2n) { background: #fff8ec; }
.tl-item:last-child { border-bottom: 0; }
.tl-item b { display: block; color: var(--name-blue); font-size: 17px; text-shadow: 1px 1px 2px #fff; }
.tl-item span { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; font-style: normal; color: #333; }
.tl-item:hover b, .tl-item:focus-visible b { color: var(--link-red); }
.tl-item:focus-visible { outline-offset: -3px; }

/* ---- forms (calculator, birthday, dream search): upright text like the site's other forms ---- */
.tl-form, .tl-form *, .tl-search, .tl-search * { font-style: normal; }
.tl-form label, .tl-search label { display: block; font-weight: 700; font-size: 13px; margin: 0 0 4px; color: #8a000c; }
.tl-form input, .tl-search input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #e0557f; border-radius: 10px; font: 16px var(--font); color: var(--ink); background: #fff; }
.tl-form .opt { font-weight: 400; color: var(--muted); }
.tl-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tl-hint { display: block; min-height: 16px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.tl-hint.ok { color: var(--green); }
.tl-hint.bad { color: var(--red); }
.tl-rates { margin: 10px 0 0; }
.tl-rates summary { cursor: pointer; font-weight: 700; color: #8a000c; padding: 6px 0; }
.tl-rates .tl-row { margin-top: 8px; }
.tl-help { font-size: 12px; font-weight: 400; font-style: normal; color: var(--muted); margin: 6px 0 0; text-shadow: none; }
.tl-form .btns-row { margin-top: 12px; }
.tl-search { margin-top: 8px; }

/* ---- result blocks (calculator, birthday) ---- */
.tl-results { display: grid; gap: 10px; }
.tl-out { background: #fff; border: 1px solid #ff9800; border-radius: 10px; padding: 10px 12px; }
.tl-out h3 { margin: 0 0 6px; font-size: 13px; color: #8a000c; text-transform: uppercase; letter-spacing: .05em; text-shadow: 1px 1px 2px #fff; }
.tl-big { margin: 2px 0 6px; font-size: clamp(24px, 7vw, 32px); font-weight: 800; font-style: italic; letter-spacing: 1px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; background: linear-gradient(#4500bf, #670009); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #4500bf; text-shadow: none; }
.tl-bad { margin: 0 0 6px; color: var(--red); font-size: 13px; font-weight: 400; font-style: normal; text-shadow: none; }
.tl-dl { margin: 0; display: grid; gap: 4px; }
.tl-dl div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: baseline; }
.tl-dl dt { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tl-dl dd { margin: 0; font-weight: 800; color: var(--head-blue); overflow-wrap: anywhere; }
.tl-dl dd.mono { line-height: 1.4; }
.tl-dl dd small { color: var(--muted); font-weight: 400; font-style: normal; }
.tl-dl .red { color: var(--red); }
.tl-pay th[scope=row] { text-align: left; padding-left: 12px; font-size: 13px; }
.tl-pay td.mono { font-size: 15px; line-height: 1.4; white-space: nowrap; }

/* ---- "only a pastime" strip on the three number games ---- */
.tl-note { margin-top: 8px; padding: 8px 12px; border: 2px solid #ff9800; border-style: outset; border-radius: var(--radius); background: var(--yellow); color: #5a2a00; font-size: 13px; font-style: normal; font-weight: 400; box-shadow: var(--shadow); }
.tl-note b { color: #8a000c; }

/* ---- dream list ---- */
.tl-group { margin: 0; }
.tl-grid { display: grid; grid-template-columns: 1fr; border-color: var(--brd-blue); }
.tl-dream { padding: 8px 12px; border-bottom: 1px solid #ffd4d8; background: #fff; }
.tl-dream:nth-child(2n) { background: #fff8ec; }
.tl-dream:last-child { border-bottom: 0; }
.tl-dname b { color: var(--name-blue); font-size: 16px; text-shadow: 1px 1px 2px #fff; }
.tl-dname span { color: var(--muted); font-size: 13px; }
.tl-dnums { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.tl-dnums span { display: inline-flex; align-items: baseline; gap: 5px; background: var(--yellow); border: 1px solid #ff9800; border-radius: 6px; padding: 1px 8px; }
.tl-dnums small { font-size: 10px; font-weight: 800; color: #8a000c; text-transform: uppercase; letter-spacing: .04em; }
.tl-dnums .mono { font-size: 14px; line-height: 1.4; color: var(--head-blue); }

/* ---- rashi table ---- */
.tl-zod { table-layout: fixed; }
.tl-zod .tl-zsign { width: 44%; text-align: left; padding-left: 10px; }
.tl-zod tbody th.tl-zsign { background: #fff; font-size: 14px; line-height: 1.3; border-bottom: 1px solid #ffd4d8; border-right: 1px solid #ffe3e5; }
.tl-zod tbody th.tl-zsign b { color: var(--name-blue); }
.tl-zod tbody th.tl-zsign span { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.tl-zod tbody th.tl-zsign small { display: block; color: var(--muted); font-weight: 400; font-style: normal; font-size: 10.5px; }
.tl-zod td.mono { font-size: 15px; line-height: 1.4; padding-left: 2px; padding-right: 2px; }

@media (min-width: 560px) {
  .tl-grid { grid-template-columns: 1fr 1fr; }
  .tl-dream:nth-child(2n) { background: #fff; }
  .tl-dream:nth-child(4n+3), .tl-dream:nth-child(4n+4) { background: #fff8ec; }
  .tl-dream:nth-child(odd) { border-right: 1px solid #ffd4d8; }
  .tl-dream:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
@media (min-width: 640px) {
  .tl-results { grid-template-columns: 1fr 1fr; }
  .tl-line { grid-column: 1 / -1; }
}
@media print {
  .tl-big { background: none; -webkit-text-fill-color: currentColor; color: #000; }
  .tl-note, .tl-search { display: none; }
}
