:root{
      --bg1:#fdf2f8; --bg2:#eff6ff;
      --ink:#0b1220; --muted:#6b7280;
      --stroke:rgba(229,231,235,.9);
      --card: rgba(255,255,255,.78);
      --card2: rgba(255,255,255,.62);
      --shadow: 0 18px 48px rgba(15,23,42,.12);
      --btn:#0b1220; --btnText:#fff;
      --btn2: rgba(15,23,42,.06);
      --focus: rgba(59,130,246,.35);

      /* lotto color bands (Korea 6/45 vibe) */
      --c1:#FBBF24; /* 1-10 */
      --c2:#60A5FA; /* 11-20 */
      --c3:#F87171; /* 21-30 */
      --c4:#34D399; /* 31-40 */
      --c5:#A78BFA; /* 41-45 */
    }

    *{ box-sizing:border-box; }

    body{
      margin:0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Apple SD Gothic Neo", "Noto Sans KR", Arial;
      color:var(--ink);
      background:
        radial-gradient(900px 520px at 15% 15%, rgba(251,207,232,.65), transparent 55%),
        radial-gradient(820px 520px at 85% 20%, rgba(191,219,254,.60), transparent 58%),
        radial-gradient(900px 620px at 75% 90%, rgba(187,247,208,.55), transparent 60%),
        linear-gradient(135deg,var(--bg1),var(--bg2));
      min-height:100vh;
      padding:28px;
    }

    /* Center content without forcing header/footer into a flex layout */
    .wrap{ width:100%; max-width:920px; margin: 0 auto; }

    .card{
      background:var(--card);
      border:1px solid var(--stroke);
      border-radius:22px;
      box-shadow: var(--shadow);
      padding:22px;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .header{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
    .brand{ display:flex; align-items:center; gap:12px; }
    .logo{
      width:44px; height:44px; border-radius:14px;
      background: linear-gradient(135deg, rgba(251,207,232,.9), rgba(191,219,254,.8));
      border: 1px solid rgba(255,255,255,.85);
      box-shadow: 0 10px 25px rgba(15,23,42,.10);
      display:flex; align-items:center; justify-content:center;
      font-weight:900;
    }
    h1{ font-size:26px; margin:0; letter-spacing:-.2px; }
    .sub{ margin:4px 0 0; color:var(--muted); line-height:1.5; }

    .row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }

    button{
      border:1px solid rgba(15,23,42,.10);
      border-radius:12px;
      padding:12px 14px;
      background:var(--btn);
      color:var(--btnText);
      cursor:pointer;
      font-weight:800;
      transition: transform .06s ease, box-shadow .18s ease, background .18s ease;
      box-shadow: 0 10px 25px rgba(15,23,42,.16);
    }
    button:hover{ transform: translateY(-1px); }
    button:active{ transform: translateY(0); box-shadow: 0 6px 14px rgba(15,23,42,.14); }
    button:focus{ outline: none; box-shadow: 0 0 0 4px var(--focus), 0 10px 25px rgba(15,23,42,.16); }

    button.secondary{
      background: var(--btn2);
      color: var(--ink);
      box-shadow: none;
    }

    .nums{
      display:flex; flex-wrap:wrap; gap:10px;
      padding:16px;
      border-radius:16px;
      background:var(--card2);
      border:1px solid rgba(229,231,235,.85);
      margin-top:14px;
      min-height:60px;
      align-items:center;
    }

    .ball{
      width:48px; height:48px;
      border-radius:999px;
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight:900;
      font-size:18px;
      color:#0b1220;
      border: 1px solid rgba(255,255,255,.8);
      box-shadow: 0 10px 22px rgba(15,23,42,.14);
      position:relative;
      user-select:none;
    }

    .ball::after{
      content:"";
      position:absolute;
      inset:1px;
      border-radius:999px;
      background: radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,.85), rgba(255,255,255,0) 55%);
      pointer-events:none;
      mix-blend-mode: screen;
      opacity:.85;
    }

    .b1{ background: linear-gradient(135deg, rgba(251,191,36,.95), rgba(251,191,36,.55)); }
    .b2{ background: linear-gradient(135deg, rgba(96,165,250,.95), rgba(96,165,250,.55)); }
    .b3{ background: linear-gradient(135deg, rgba(248,113,113,.95), rgba(248,113,113,.55)); }
    .b4{ background: linear-gradient(135deg, rgba(52,211,153,.95), rgba(52,211,153,.55)); }
    .b5{ background: linear-gradient(135deg, rgba(167,139,250,.95), rgba(167,139,250,.55)); }

    .meta{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
    .chip{
      font-size:12.5px;
      color:rgba(17,24,39,.75);
      background: rgba(255,255,255,.65);
      border:1px solid rgba(229,231,235,.9);
      padding:8px 10px;
      border-radius:999px;
    }

    .hist{ margin-top:18px; }
    .hist h2{ font-size:15px; margin:0 0 10px; color:rgba(15,23,42,.9); }

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

    .history-item{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      padding:10px 12px;
      border-radius:14px;
      background: rgba(255,255,255,.55);
      border:1px solid rgba(229,231,235,.9);
    }

    .history-balls{ display:flex; flex-wrap:wrap; gap:8px; }
    .history-item .ball{ width:40px; height:40px; font-size:15px; box-shadow: 0 8px 18px rgba(15,23,42,.12); }

    .history-meta{ font-size:12px; color:rgba(107,114,128,.95); white-space:nowrap; }

    .footer{ margin-top:14px; font-size:12px; color:var(--muted); }
    code{ background: rgba(15,23,42,.06); padding:2px 6px; border-radius:8px; }

    
/* --- Global layout helpers for SEO pages --- */
.top{ position:sticky; top:0; z-index:10; }
.top-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(229,231,235,.9);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(15,23,42,.10);
}
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; font-weight:900; }
.brand-badge{
  width:38px; height:38px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(251,207,232,.9), rgba(191,219,254,.8));
  border: 1px solid rgba(255,255,255,.85);
}
.brand-text{ letter-spacing:-.2px; }
.nav{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.nav a{
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  color: rgba(17,24,39,.82);
  padding:8px 10px;
  border-radius:999px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.58);
}
.nav a:hover{ border-color: rgba(59,130,246,.35); }
.nav a.active,[aria-current="page"]{ border-color: rgba(59,130,246,.5); }

.page{
  max-width: 980px;
  margin: 16px auto 0;
  padding: 0 18px 30px;
}

.card + .content{ margin-top: 16px; }

.content{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(229,231,235,.9);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(15,23,42,.10);
  padding: 20px;
}

.content h2{ margin: 0 0 10px; font-size:18px; }
.content h3{ margin: 18px 0 8px; font-size:15px; }
.content p{ margin: 8px 0; color: rgba(17,24,39,.86); }
.content ul{ margin: 8px 0 8px 18px; }
.content li{ margin: 6px 0; color: rgba(17,24,39,.86); }

.faq details{
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(229,231,235,.9);
  border-radius: 14px;
  padding: 12px 12px;
  margin: 10px 0;
}
.faq summary{ cursor:pointer; font-weight:800; }

.footer{ margin: 16px auto 0; max-width: 980px; padding: 0 18px 28px; }
.footer-inner{
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(229,231,235,.9);
  border-radius: 18px;
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.footer-links{ display:flex; gap:10px; flex-wrap:wrap; }
.footer-links a{ color: rgba(17,24,39,.75); text-decoration:none; font-weight:700; font-size:12.5px; }
.footer-links a:hover{ text-decoration:underline; }
.footer-note{ color: rgba(107,114,128,.95); font-size:12px; }

@media (max-width:540px){
  body{ padding:18px; }
  .card{ padding:16px; }
  h1{ font-size:22px; }
  .ball{ width:44px; height:44px; }
  button{ flex: 1 1 auto; }
  .history-meta{ display:none; }

  /* Mobile header: keep it normal flow + horizontally scrollable menu */
  .top{ position: static; }
  .top-inner{
    padding: 10px 12px;
    flex-wrap: wrap;
    border-radius: 16px;
  }
  .brand{ flex: 1 1 100%; }
  .nav{
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav a{ flex: 0 0 auto; }
}

