/* LatestLotteryNumbers redesign
 * app/assets/stylesheets/lln/redesign.css
 *
 * Prefix: .ll-   (lotcan uses .lc- .lx- .ew- .px- — no overlap)
 * Mobile-first: base styles are 375px, media queries scale up.
 * Bootstrap 5 is still loaded for unredesigned LLN pages; nothing here
 * depends on it.
 */

 :root {
  --ll-bg:        #FFFFFF;
  --ll-surface:   #F7F8FA;
  --ll-ink:       #14181F;
  --ll-ink-soft:  #4A5260;
  --ll-muted:     #78808F;
  --ll-line:      rgba(20, 24, 31, 0.10);
  --ll-line-med:  rgba(20, 24, 31, 0.18);
  --ll-accent:    #1B4FD8;
  --ll-green:     #0E7A4F;
  --ll-gold:      #C8891A;
  --ll-red:       #C0392B;

  --ll-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --ll-r-sm: 6px;
  --ll-r-md: 10px;
  --ll-r-lg: 14px;
  --ll-ease: 0.18s ease;
}

/* ---------- hub shell ---------- */

.ll-crumbs {
  font-size: 13px;
  color: var(--ll-muted);
  margin: 12px 0 4px;
  font-family: var(--ll-sans);
}
.ll-crumbs a { color: var(--ll-muted); text-decoration: none; }
.ll-crumbs a:hover { color: var(--ll-accent); text-decoration: underline; }
.ll-crumbs span[aria-hidden] { margin: 0 6px; opacity: 0.5; }

.ll-hub-head { margin: 4px 0 16px; font-family: var(--ll-sans); }
.ll-hub-head h1 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ll-ink);
  margin: 0 0 4px;
}
.ll-hub-sub { font-size: 14px; color: var(--ll-muted); margin: 0; }

.ll-empty {
  font-size: 15px;
  color: var(--ll-muted);
  padding: 24px 0;
  font-family: var(--ll-sans);
}

/* ---------- full card ---------- */

.ll-featured { display: flex; flex-direction: column; gap: 10px; }

.ll-card {
  background: var(--ll-bg);
  border: 1px solid var(--ll-line);
  border-radius: var(--ll-r-md);
  padding: 13px 15px;
  font-family: var(--ll-sans);
}

.ll-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  text-decoration: none;
  min-height: 44px;
}
.ll-card__logo {
  width: 36px; height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
  border-radius: var(--ll-r-sm);
}
.ll-card__logo--fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--ll-surface);
  color: var(--ll-muted);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
}
.ll-card__title { display: flex; flex-direction: column; min-width: 0; }
.ll-card__name {
  font-size: 16px; font-weight: 600; color: var(--ll-ink);
  line-height: 1.25;
}
.ll-card__date { font-size: 13px; color: var(--ll-ink-soft); }

.ll-card__pending {
  font-size: 14px; color: var(--ll-muted);
  margin: 0 0 11px; padding: 8px 0;
}

.ll-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  border-top: 1px solid var(--ll-line);
  padding-top: 9px;
}
.ll-card__next { text-align: right; margin-left: auto; }
.ll-lbl {
  display: block;
  font-size: 12px; color: var(--ll-muted);
  margin-bottom: 1px;
}
.ll-figure { font-size: 18px; font-weight: 600; color: var(--ll-ink); }
.ll-when   { font-size: 13px; color: var(--ll-ink-soft); }

/* ---------- balls ---------- */

.ll-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 11px;
}

.ll-ball {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ll-line-med);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--ll-ink);
  font-variant-numeric: tabular-nums;
  background: var(--ll-bg);
}
.ll-ball--bonus {
  background: var(--ll-gold);
  border-color: var(--ll-gold);
  color: #FFFFFF;
}

/* digit games: squared tiles, larger glyph, draw order matters */
.ll-balls--digit .ll-ball {
  width: 42px; height: 46px;
  border-radius: var(--ll-r-sm);
  border: none;
  background: var(--ll-surface);
  font-size: 22px;
}
.ll-balls--digit .ll-ball--bonus {
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 16px;
  background: var(--ll-gold);
  color: #FFFFFF;
}
.ll-balls__rule {
  width: 1px; height: 30px;
  background: var(--ll-line);
  margin: 0 3px;
  display: inline-block;
}

.ll-ball--sm {
  width: 27px; height: 27px;
  font-size: 12px;
  font-weight: 600;
  border-color: var(--ll-line);
}
.ll-row__nums--digit .ll-ball--sm {
  width: 25px; height: 29px;
  border-radius: 5px;
  border: none;
  background: var(--ll-surface);
  font-size: 15px;
}
.ll-row__nums--digit .ll-ball--sm.ll-ball--bonus {
  width: 23px; height: 23px;
  border-radius: 50%;
  font-size: 12px;
  background: var(--ll-gold);
  color: #FFFFFF;
}

/* ---------- compact rows ---------- */

.ll-rows {
  background: var(--ll-bg);
  border: 1px solid var(--ll-line);
  border-radius: var(--ll-r-md);
  overflow: hidden;
  margin-top: 10px;
  font-family: var(--ll-sans);
}

.ll-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 44px;
  text-decoration: none;
  border-top: 1px solid var(--ll-line);
  transition: background var(--ll-ease);
}
.ll-rows > .ll-row:first-child,
.ll-rows__more > .ll-row:first-child { border-top: none; }
.ll-row:hover { background: var(--ll-surface); }

.ll-row__label { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ll-row__name {
  font-size: 15px; font-weight: 600; color: var(--ll-ink); line-height: 1.3;
}
.ll-row__qual { font-weight: 400; color: var(--ll-ink-soft); }
.ll-row__date { font-size: 12px; color: var(--ll-muted); }

.ll-row__nums { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.ll-row__pending { font-size: 13px; color: var(--ll-muted); }

.ll-more-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 10px 0 0;
  padding: 11px;
  background: none;
  border: 1px solid var(--ll-line);
  border-radius: var(--ll-r-md);
  color: var(--ll-accent);
  font-family: var(--ll-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ll-ease);
}
.ll-more-btn:hover { background: var(--ll-surface); }

/* ---------- archive ---------- */

.ll-archive {
  background: var(--ll-surface);
  border-radius: var(--ll-r-md);
  padding: 14px 16px;
  margin: 18px 0;
  font-family: var(--ll-sans);
}
.ll-archive h2 {
  font-size: 16px; font-weight: 600; color: var(--ll-ink); margin: 0 0 4px;
}
.ll-archive__intro {
  font-size: 13px; color: var(--ll-ink-soft); line-height: 1.5; margin: 0 0 8px;
}
.ll-archive__list { list-style: none; margin: 0; padding: 0; }
.ll-archive__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  min-height: 44px;
  border-top: 1px solid var(--ll-line);
}
.ll-archive__list a {
  font-size: 15px; color: var(--ll-accent); text-decoration: none;
}
.ll-archive__list a:hover { text-decoration: underline; }
.ll-archive__span { font-size: 13px; color: var(--ll-muted); white-space: nowrap; }

/* ---------- ads ---------- */

.ll-ad--feed { margin: 14px 0; min-height: 100px; text-align: center; }

/* ---------- breakpoints ---------- */

@media (min-width: 576px) {
  .ll-hub-head h1 { font-size: 30px; }
  .ll-ball { width: 44px; height: 44px; font-size: 17px; }
  .ll-balls--digit .ll-ball { width: 46px; height: 50px; font-size: 24px; }
}

@media (min-width: 768px) {
  .ll-featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
  }
  .ll-hub-head h1 { font-size: 34px; }
}

/* ============================================================
   SHELL — masthead, layout, sidebar, footer
   Replaces the 2013 Bootstrap-3 frame. LLN only.
   ============================================================ */

.ll-body {
  background: var(--ll-surface);
  font-family: var(--ll-sans);
  color: var(--ll-ink);
  -webkit-font-smoothing: antialiased;
}

.ll-skip {
  position: absolute; left: -9999px;
  background: var(--ll-ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 var(--ll-r-sm) 0;
  z-index: 100;
}
.ll-skip:focus { left: 0; top: 0; }

/* ---------- masthead ---------- */

.ll-masthead {
  background: var(--ll-bg);
  border-bottom: 1px solid var(--ll-line);
  position: sticky; top: 0; z-index: 50;
}
.ll-masthead__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ll-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.ll-brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ll-ink);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 7px 9px;
  border-radius: var(--ll-r-sm);
  line-height: 1;
}
.ll-brand__mark--sm { font-size: 13px; padding: 6px 8px; }

.ll-brand__word { display: flex; flex-direction: column; line-height: 1.15; }
.ll-brand__name {
  font-size: 15px; font-weight: 600; color: var(--ll-ink); letter-spacing: -0.01em;
}
.ll-brand__tag { font-size: 11px; color: var(--ll-muted); }

.ll-masthead__nav { display: none; gap: 18px; margin-left: 8px; }
.ll-masthead__nav a {
  font-size: 14px; font-weight: 500; color: var(--ll-ink-soft);
  text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--ll-ease), border-color var(--ll-ease);
}
.ll-masthead__nav a:hover { color: var(--ll-ink); border-bottom-color: var(--ll-accent); }

.ll-search { display: flex; align-items: center; gap: 0; margin-left: auto; }
.ll-search__label { position: absolute; left: -9999px; }
.ll-search input {
  font-size: 16px;              /* iOS zoom guard */
  font-family: inherit;
  border: 1px solid var(--ll-line-med);
  border-right: none;
  border-radius: var(--ll-r-sm) 0 0 var(--ll-r-sm);
  padding: 8px 11px;
  width: 150px;
  min-height: 40px;
  background: var(--ll-bg);
  color: var(--ll-ink);
}
.ll-search input:focus { outline: 2px solid var(--ll-accent); outline-offset: -2px; }
.ll-search button {
  min-height: 40px; min-width: 42px;
  border: 1px solid var(--ll-line-med);
  border-radius: 0 var(--ll-r-sm) var(--ll-r-sm) 0;
  background: var(--ll-surface);
  color: var(--ll-ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ll-search button:hover { background: var(--ll-bg); color: var(--ll-accent); }

/* ---------- shell ---------- */

.ll-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 40px;
  display: block;
}
.ll-main { min-width: 0; }
.ll-side { margin-top: 26px; }

/* ---------- sidebar panels ---------- */

.ll-panel {
  background: var(--ll-bg);
  border: 1px solid var(--ll-line);
  border-radius: var(--ll-r-md);
  overflow: hidden;
  margin-bottom: 14px;
}
.ll-panel__head {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ll-muted);
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ll-line);
  background: var(--ll-surface);
}
.ll-panel__body { padding: 12px 14px; }

.ll-link { font-size: 14px; color: var(--ll-accent); text-decoration: none; }
.ll-link:hover { text-decoration: underline; }

.ll-upcoming { list-style: none; margin: 0; padding: 0; }
.ll-upcoming li { border-top: 1px solid var(--ll-line); }
.ll-upcoming li:first-child { border-top: none; }
.ll-upcoming a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; min-height: 44px;
  text-decoration: none;
  transition: background var(--ll-ease);
}
.ll-upcoming a:hover { background: var(--ll-surface); }
.ll-upcoming__logo { width: 30px; height: 24px; object-fit: contain; flex: 0 0 30px; }
.ll-upcoming__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ll-upcoming__name {
  font-size: 13px; font-weight: 600; color: var(--ll-ink); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ll-upcoming__when { font-size: 12px; color: var(--ll-muted); }
.ll-upcoming__jp {
  font-size: 13px; font-weight: 600; color: var(--ll-green);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.ll-ad { margin: 0 0 14px; text-align: center; }

/* ---------- footer ---------- */

.ll-footer {
  background: var(--ll-ink);
  color: rgba(255,255,255,0.62);
  margin-top: 30px;
  padding: 30px 16px 26px;
}
.ll-footer__inner { max-width: 1180px; margin: 0 auto; }
.ll-footer__brand { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.ll-footer__brand .ll-brand__mark { background: #fff; color: var(--ll-ink); flex: 0 0 auto; }
.ll-footer__brand p {
  font-size: 13px; line-height: 1.6; margin: 0; max-width: 46ch;
}
.ll-footer__links {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ll-footer__links a {
  font-size: 14px; color: #fff; text-decoration: none;
  min-height: 32px; display: inline-flex; align-items: center;
}
.ll-footer__links a:hover { text-decoration: underline; }
.ll-footer__legal {
  font-size: 12px; line-height: 1.7; margin: 16px 0 0;
  color: rgba(255,255,255,0.48);
}
.ll-footer__legal a { color: rgba(255,255,255,0.75); }

/* ---------- shell breakpoints ---------- */

@media (min-width: 768px) {
  .ll-masthead__nav { display: flex; }
  .ll-search input { width: 200px; }
}

@media (min-width: 992px) {
  .ll-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: 26px;
    align-items: start;
  }
  .ll-side { margin-top: 0; position: sticky; top: 74px; }
  .ll-search input { width: 240px; }
}
