/* ロト予想サイトGP — common stylesheet */
:root{
  --bg:#f6f7fb; --surface:#ffffff; --surface-2:#f0f2f8; --line:#e2e5ee;
  --text:#1c2333; --muted:#5d6678; --faint:#8a92a3;
  --brand:#2f5bea; --brand-ink:#ffffff; --brand-soft:#e8eefe;
  --accent:#e8a317; --ok:#1f9d63; --ng:#d64545;
  --l6:#2f6fe0; --l6-soft:#e6efff;
  --l7:#c2410c; --l7-soft:#fff0e6;
  --mn:#15803d; --mn-soft:#e7f6ec;
  --ball:#ffffff; --ball-ink:#1c2333;
  --shadow:0 1px 2px rgba(20,30,60,.05),0 4px 16px rgba(20,30,60,.05);
  --radius:14px;
  --font:"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP","Yu Gothic UI","Meiryo",system-ui,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0f131c; --surface:#171c27; --surface-2:#1e2431; --line:#2a3242;
    --text:#e8ecf4; --muted:#a3acbd; --faint:#7a8396;
    --brand:#7b9cff; --brand-ink:#0f131c; --brand-soft:#1f2a4a;
    --l6:#6f9cff; --l6-soft:#1b2744; --l7:#ff8a4c; --l7-soft:#3a2216; --mn:#4ccb7f; --mn-soft:#16301f;
    --ball:#232a38; --ball-ink:#e8ecf4; --shadow:none; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0f131c; --surface:#171c27; --surface-2:#1e2431; --line:#2a3242;
  --text:#e8ecf4; --muted:#a3acbd; --faint:#7a8396;
  --brand:#7b9cff; --brand-ink:#0f131c; --brand-soft:#1f2a4a;
  --l6:#6f9cff; --l6-soft:#1b2744; --l7:#ff8a4c; --l7-soft:#3a2216; --mn:#4ccb7f; --mn-soft:#16301f;
  --ball:#232a38; --ball-ink:#e8ecf4; --shadow:none; color-scheme:dark;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:15px;line-height:1.75;overflow-x:hidden}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}
h1,h2,h3{line-height:1.35;margin:0 0 .6em}
h1{font-size:1.7rem}
h2{font-size:1.3rem;margin-top:1.8em}
h3{font-size:1.08rem;margin-top:1.4em}
p{margin:0 0 1em}
small,.small{font-size:.85em;color:var(--muted)}
.muted{color:var(--muted)}
.wrap{max-width:1120px;margin:0 auto;padding:0 16px}
.g-loto6{--g:var(--l6);--g-soft:var(--l6-soft)}
.g-loto7{--g:var(--l7);--g-soft:var(--l7-soft)}
.g-miniloto{--g:var(--mn);--g-soft:var(--mn-soft)}
body:not([class*="g-"]){--g:var(--brand);--g-soft:var(--brand-soft)}

/* header */
.site-header{background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}
.site-header .wrap{display:flex;align-items:center;gap:12px;min-height:58px}
.logo{display:flex;align-items:center;gap:8px;font-weight:800;font-size:1.12rem;color:var(--text);white-space:nowrap}
.logo:hover{text-decoration:none}
.logo .mark{width:30px;height:30px;border-radius:50%;background:conic-gradient(var(--l6) 0 33%,var(--l7) 0 66%,var(--mn) 0);display:grid;place-items:center}
.logo .mark::after{content:"";width:14px;height:14px;border-radius:50%;background:var(--surface)}
.gnav{display:flex;gap:2px;margin-left:auto;flex-wrap:wrap}
.gnav a{padding:8px 12px;border-radius:999px;color:var(--text);font-weight:600;font-size:.92rem}
.gnav a:hover{background:var(--surface-2);text-decoration:none}
.gnav a.on{background:var(--g-soft);color:var(--g)}
.menu-btn{display:none;margin-left:auto;background:none;border:1px solid var(--line);border-radius:10px;padding:6px 10px;color:var(--text);font:inherit;cursor:pointer}
.theme-btn{display:grid;place-items:center;background:none;border:1px solid var(--line);border-radius:999px;width:34px;height:34px;color:var(--text);cursor:pointer;font-size:15px}
@media (max-width:860px){
  .menu-btn{display:block}
  .gnav{display:none;position:absolute;left:0;right:0;top:58px;background:var(--surface);border-bottom:1px solid var(--line);flex-direction:column;padding:8px 16px 14px}
  .gnav.open{display:flex}
  .gnav a{border-radius:10px}
}

/* sub nav (game) */
.subnav{background:var(--surface);border-bottom:1px solid var(--line)}
.subnav .wrap{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.subnav .wrap::-webkit-scrollbar{display:none}
.subnav a{padding:12px 14px;white-space:nowrap;color:var(--muted);font-weight:600;border-bottom:3px solid transparent}
.subnav a.on{color:var(--g);border-bottom-color:var(--g)}
.subnav a:hover{text-decoration:none;color:var(--text)}

.crumbs{font-size:.82rem;color:var(--muted);margin:14px 0 4px}
.crumbs a{color:var(--muted)}
main{padding-bottom:40px}
.page-head{padding:18px 0 6px}
.page-head .lead{color:var(--muted);max-width:760px}
.tag{display:inline-block;font-size:.75rem;font-weight:700;padding:2px 10px;border-radius:999px;background:var(--g-soft);color:var(--g);margin-bottom:8px}

/* cards & grid */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow);min-width:0}
.card h2:first-child,.card h3:first-child{margin-top:0}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:900px){.g3,.g4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.g2,.g3,.g4{grid-template-columns:minmax(0,1fr)}}
.section{margin-top:28px}
.section>h2:first-child{margin-top:0}

/* hero */
.hero{background:linear-gradient(135deg,var(--brand-soft),var(--surface) 60%);border-bottom:1px solid var(--line);padding:36px 0 30px}
.hero h1{font-size:1.9rem;margin-bottom:.35em}
.hero p{color:var(--muted);max-width:720px;margin-bottom:0}
@media (max-width:640px){.hero h1{font-size:1.45rem}}

/* game card */
.gcard{border-top:4px solid var(--g)}
.gcard .ghead{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.gcard .gname{font-weight:800;font-size:1.15rem;color:var(--g)}
.gcard .meta{font-size:.85rem;color:var(--muted)}
.gcard .links{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.next{margin-top:12px;font-size:.88rem;background:var(--g-soft);border-radius:10px;padding:8px 12px}
.next b{color:var(--g)}

/* balls */
.balls{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0}
.ball{width:38px;height:38px;border-radius:50%;display:inline-grid;place-items:center;font-weight:800;font-size:1rem;background:var(--ball);color:var(--ball-ink);border:2px solid var(--g);font-variant-numeric:tabular-nums;flex:none}
.ball.b{border-style:dashed;color:var(--g)}
.ball.sm{width:28px;height:28px;font-size:.82rem;border-width:1.5px}
.ball.hit{background:var(--g);color:#fff}
.ball.lg{width:46px;height:46px;font-size:1.15rem}
.plus{color:var(--faint);font-weight:700;margin:0 2px}
@media (max-width:420px){.ball{width:33px;height:33px;font-size:.9rem}.ball.lg{width:38px;height:38px;font-size:1rem}}

/* buttons & forms */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 16px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text);font:inherit;font-weight:700;font-size:.9rem;cursor:pointer;line-height:1.3}
.btn:hover{background:var(--surface-2);text-decoration:none}
.btn.primary{background:var(--g);border-color:var(--g);color:#fff}
.btn.primary:hover{filter:brightness(1.07)}
.btn.sm{padding:5px 11px;font-size:.82rem}
.btn:disabled{opacity:.5;cursor:not-allowed}
.chip{display:inline-block;padding:4px 12px;border-radius:999px;background:var(--surface-2);color:var(--text);font-size:.82rem;font-weight:600;border:1px solid transparent}
.chip:hover{border-color:var(--line);text-decoration:none}
label.f{display:block;font-size:.82rem;font-weight:700;color:var(--muted);margin-bottom:4px}
input[type=number],input[type=text],input[type=date],select{font:inherit;font-size:.92rem;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);max-width:100%}
input[type=range]{width:100%;accent-color:var(--g)}
.form-row{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.form-row>div{min-width:0}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;flex-wrap:wrap}
.seg button{background:var(--surface);border:0;border-right:1px solid var(--line);padding:7px 12px;font:inherit;font-size:.85rem;font-weight:600;color:var(--muted);cursor:pointer}
.seg button:last-child{border-right:0}
.seg button.on{background:var(--g);color:#fff}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.tabs button{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:7px 14px;font:inherit;font-weight:700;font-size:.86rem;color:var(--muted);cursor:pointer}
.tabs button.on{background:var(--g);border-color:var(--g);color:#fff}

/* number picker */
.picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:6px;max-width:560px}
.picker button{aspect-ratio:1;border-radius:50%;border:1.5px solid var(--line);background:var(--surface);color:var(--text);font:inherit;font-weight:700;cursor:pointer;font-variant-numeric:tabular-nums;padding:0}
.picker button.on{background:var(--g);border-color:var(--g);color:#fff}
.picker button.ex{background:var(--surface-2);color:var(--faint);text-decoration:line-through}
.picker button.fx{background:var(--accent);border-color:var(--accent);color:#fff}

/* tables */
.tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px}
table{border-collapse:collapse;width:100%;font-size:.9rem;font-variant-numeric:tabular-nums}
th,td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
th{background:var(--surface-2);font-size:.8rem;color:var(--muted);font-weight:700;position:sticky;top:0}
tr:last-child td{border-bottom:0}
td.r,th.r{text-align:right}
td.c,th.c{text-align:center}
th.sort{cursor:pointer;user-select:none}
th.sort::after{content:" ⇅";color:var(--faint)}
tbody tr:hover{background:var(--surface-2)}
.nums{display:inline-flex;gap:4px;flex-wrap:wrap}
.n{display:inline-grid;place-items:center;min-width:26px;height:26px;border-radius:50%;border:1.5px solid var(--g);font-weight:700;font-size:.8rem}
.n.b{border-style:dashed;color:var(--g)}
.n.hl{background:var(--g);color:#fff}

/* stats */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.kpi{background:var(--surface-2);border-radius:12px;padding:12px 14px}
.kpi .k{font-size:.78rem;color:var(--muted);font-weight:700}
.kpi .v{font-size:1.35rem;font-weight:800;font-variant-numeric:tabular-nums}
.kpi .s{font-size:.78rem;color:var(--muted)}
.chart{width:100%;overflow-x:auto}
.chart svg{display:block;max-width:100%;height:auto}
.chart text{fill:var(--muted);font-size:10px;font-family:var(--font)}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.8rem;color:var(--muted);margin-top:6px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.bar-list{display:grid;gap:6px}
.bar-row{display:grid;grid-template-columns:36px 1fr 120px;gap:8px;align-items:center;font-size:.85rem;font-variant-numeric:tabular-nums}
.bar-row .track{height:12px;background:var(--surface-2);border-radius:6px;overflow:hidden}
.bar-row .fill{height:100%;background:var(--g);border-radius:6px}
.heat{border-collapse:separate;border-spacing:2px;font-size:.72rem}
.heat td,.heat th{padding:0;border:0;width:22px;height:22px;text-align:center;border-radius:4px;position:static}
.heat th{background:none;font-size:.7rem}
.heat td.on{background:var(--g);color:#fff;font-weight:700}
.heat td.bo{box-shadow:inset 0 0 0 2px var(--g);color:var(--g);font-weight:700}
.heat td.off{background:var(--surface-2)}
.heat th.rl{text-align:right;padding-right:6px;width:auto;white-space:nowrap;color:var(--muted)}

.callout{border-left:4px solid var(--g);background:var(--g-soft);padding:12px 16px;border-radius:0 12px 12px 0;margin:16px 0}
.callout.warn{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface))}
.callout p:last-child{margin-bottom:0}
.lines{display:grid;gap:8px}
.line{display:flex;align-items:center;gap:10px;background:var(--surface-2);border-radius:12px;padding:6px 12px;flex-wrap:wrap}
.line .balls{margin:4px 0}
.line .idx{font-weight:800;color:var(--faint);width:28px;font-variant-numeric:tabular-nums}
.line .meta{margin-left:auto;font-size:.78rem;color:var(--muted)}
.score-row{display:grid;grid-template-columns:30px 40px 1fr 54px;align-items:center;gap:8px;font-size:.85rem;font-variant-numeric:tabular-nums}
.score-row .track{height:10px;background:var(--surface-2);border-radius:5px;overflow:hidden}
.score-row .fill{height:100%;background:var(--g)}
.score-row.top .fill{background:var(--accent)}

/* article */
.article{max-width:820px}
.article .card{padding:26px 30px}
@media (max-width:640px){.article .card{padding:18px}}
.article h2{border-bottom:2px solid var(--line);padding-bottom:6px}
.article ul,.article ol{padding-left:1.4em;margin:0 0 1em}
.article li{margin:.25em 0}
.toc{background:var(--surface-2);border-radius:12px;padding:12px 18px;margin-bottom:18px}
.toc ol{margin:0}
.alist{display:grid;gap:12px}
.alist a.card{display:block;color:var(--text)}
.alist a.card:hover{text-decoration:none;border-color:var(--g)}
.alist .t{font-weight:800;margin-bottom:4px}
.alist .d{font-size:.88rem;color:var(--muted)}

/* ad slot (AdSense placeholder) */
.ad-slot{margin:22px 0;min-height:0}
.ad-slot:empty{display:none}

/* footer */
.site-footer{background:var(--surface);border-top:1px solid var(--line);padding:30px 0 24px;margin-top:30px;font-size:.86rem;color:var(--muted)}
.fcols{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
@media (max-width:760px){.fcols{grid-template-columns:repeat(2,minmax(0,1fr))}}
.fcols h4{margin:0 0 8px;color:var(--text);font-size:.9rem}
.fcols ul{list-style:none;margin:0;padding:0}
.fcols li{margin:4px 0}
.fcols a{color:var(--muted)}
.disclaimer{margin-top:20px;padding-top:16px;border-top:1px solid var(--line);font-size:.78rem}
.pager{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:14px}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--bg);padding:10px 18px;border-radius:999px;font-weight:700;font-size:.88rem;opacity:0;transition:.25s;pointer-events:none;z-index:99}
.toast.show{opacity:1}
.hide{display:none!important}
.mt0{margin-top:0}.mt8{margin-top:8px}.mt16{margin-top:16px}.mb0{margin-bottom:0}
.flex{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.right{margin-left:auto}
@media print{.site-header,.subnav,.site-footer,.no-print,.ad-slot{display:none!important}body{background:#fff}}
.article td{white-space:normal;min-width:72px}
#gen-result{scroll-margin-top:72px}
