:root {
  color-scheme:light;
  --ink:#16131e;
  --muted:#585463;
  --canvas:#faf9f6;
  --border:#dedbe3;
  --lime:#dceeb1;
  --lilac:#e8dfff;
  --cream:#f4ecd6;
  --mint:#c8e6cd;
  --violet:#56338d;
  --ease:cubic-bezier(.2,.7,.25,1);
}
*,*::before,*::after { box-sizing:border-box; }
[hidden] { display:none!important; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--canvas); color:var(--ink); font:500 1rem/1.55 Inter,Pretendard,'Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif; }
h1,h2,h3,p,ol,ul { margin:0; }
h1,h2,h3,p { word-break:keep-all; overflow-wrap:anywhere; }
h1,h2,h3 { letter-spacing:-.055em; line-height:1.15; }
h1 { font-size:clamp(2.45rem,5.8vw,5.1rem); font-weight:830; }
h2 { font-size:clamp(1.22rem,3vw,1.7rem); font-weight:820; }
h3 { font-size:1.16rem; font-weight:820; }
a { color:inherit; text-underline-offset:.2em; }
button,input,select,textarea { font:inherit; color:inherit; }
button,summary,select { cursor:pointer; }
button:disabled { cursor:wait; opacity:.52; }
:focus-visible { outline:3px solid #6f39bb; outline-offset:3px; }
.wrap { width:min(calc(100% - 36px),1112px); margin-inline:auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.skip { position:fixed; z-index:3; inset:9px auto auto 12px; padding:9px; background:#191421; color:white; }
.skip:not(:focus) { clip-path:inset(50%); }
.header { background:white; border-bottom:1px solid var(--border); }
.nav-row { display:flex; min-height:66px; align-items:center; justify-content:space-between; gap:5px 20px; flex-wrap:wrap; }
.brand { display:inline-flex; align-items:center; gap:8px; font-size:1.08rem; letter-spacing:-.025em; font-weight:880; text-decoration:none; }
.brand img { display:block; border-radius:10px; }
nav { display:flex; align-items:center; flex-wrap:wrap; gap:3px; }
nav a { display:inline-block; padding:8px 12px; border-radius:999px; font-size:.91rem; font-weight:760; text-decoration:none; }
nav a:hover,nav a[aria-current] { background:#eae3fb; }
.main { margin-block:23px 34px; min-width:0; }
.main > * + * { margin-top:17px; }
.hero { display:grid; align-items:center; min-height:clamp(312px,39vw,445px); border-radius:29px; background:#191426; color:#fff; overflow:hidden; isolation:isolate; position:relative; }
.hero-art,.hero::after { position:absolute; inset:0; width:100%; height:100%; }
.hero-art { z-index:-2; inset:0 0 0 auto; width:75%; object-fit:cover; object-position:69% 54%; }
.hero::after { content:''; z-index:-1; background:linear-gradient(90deg,rgba(18,14,26,.99),rgba(18,14,26,.89) 27%,rgba(18,14,26,.28) 61%,transparent 82%); }
.hero-copy { padding:clamp(25px,6vw,60px); }
.hero-main { display:block; font-size:1.19em; font-weight:850; letter-spacing:-.07em; }
.hero-sub { display:block; margin-top:4px; color:#f0e7ff; font-size:.61em; font-weight:800; }
.hero p { margin-top:18px; color:#f2eafa; font-size:clamp(.91rem,1.65vw,1.075rem); }
.pill { display:inline-flex; justify-content:center; align-items:center; gap:8px; min-height:44px; padding:9px 18px; border:1px solid var(--ink); border-radius:999px; font-size:.95rem; font-weight:780; line-height:1.3; text-decoration:none; }
.hero .pill { margin-top:22px; }
.pill.lime { background:var(--lime); color:#191421; border-color:var(--lime); }
.pill.lime:hover { background:#eef9db; }
.pill.dark { background:var(--ink); color:#fff; }
.pill.dark:hover { background:#3b2e54; }
.pill.outline { background:#fff; color:var(--ink); }
.pill.outline:hover { background:#f3eeff; }
.share-row { display:flex; justify-content:flex-end; min-width:0; }
.tool-grid,.guide-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(0,1fr); gap:14px; align-items:start; }
.guide-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.generator,.content-card,.history,.info-card,.intro { border:1px solid var(--border); border-radius:23px; padding:clamp(14px,3.1vw,27px); min-width:0; background:#fff; }
.info-card,.history,.generator,.content-card { min-width:0; }
.section-top { display:flex; align-items:baseline; justify-content:space-between; gap:7px 13px; flex-wrap:wrap; }
.section-top a,.text-button,.text-link { font-size:.91rem; color:#533385; }
.text-button { border:0; padding:4px 0; background:transparent; text-decoration:underline; text-underline-offset:.19em; font-weight:720; }
.quick-info { display:grid; gap:13px; }
.lilac { background:var(--lilac); border-color:#d9cbee; }
.cream { background:var(--cream); border-color:#e7ddc0; }
.mint { background:var(--mint); border-color:#b8d8bd; }
.section-label { color:#47395b; font-weight:750; font-size:.88rem; margin-bottom:4px; }
.info-card time { display:block; margin-top:6px; color:#4c4260; font-size:.88rem; font-variant-numeric:tabular-nums; }
.info-card .balls { margin-top:13px; --ball-size:clamp(27px,2.76vw,38px); }
.info-card .pill { margin-top:15px; }
.info-card p:not(.section-label) { margin-top:8px; }
.info-card .odds { color:#352c21; font:850 clamp(1.4rem,3vw,2rem)/1.1 Inter,system-ui,sans-serif; letter-spacing:-.055em; }
.info-card .text-link { display:inline-block; margin-top:9px; font-weight:790; }
fieldset { min-width:0; padding:0; margin:0; border:0; }
.count-choices { display:flex; flex-wrap:wrap; gap:5px; margin-top:15px; }
.count-choices legend { margin-bottom:6px; color:#4a4255; font-size:.9rem; font-weight:760; }
.count-choices label { position:relative; cursor:pointer; }
.count-choices input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.count-choices span { display:inline-flex; align-items:center; min-height:37px; padding:4px 11px; border-radius:99px; border:1px solid var(--border); font-size:.91rem; font-weight:750; }
.count-choices input:checked+span { border-color:#211b2d; background:#211b2d; color:white; }
.count-choices input:focus-visible+span { outline:2px solid var(--violet); outline-offset:2px; }
.draw-stage { display:flex; align-items:center; gap:clamp(9px,2.4vw,25px); min-width:0; min-height:104px; margin-top:13px; padding:10px clamp(8px,2vw,16px); border:1px solid #d9cbed; border-radius:15px; background:radial-gradient(ellipse at 3% 110%,#e4d5fe 5%,#f7f2ff 64%); }
.chamber { display:grid; justify-items:center; width:67px; flex:0 0 67px; }
.glass { position:relative; isolation:isolate; width:63px; height:63px; overflow:hidden; border-radius:50%; border:2px solid #8c72b2; background:radial-gradient(circle at 29% 15%,#fff,#e7d8fa 47%,#c8b2ed); box-shadow:inset 0 0 0 3px #fff8,0 3px 7px #60428232; }
.glass::after { content:''; inset:4px; position:absolute; z-index:2; border-top:2px solid #ffffffe6; border-radius:50%; transform:rotate(-28deg); }
.machine-foot { width:50px; height:8px; background:#2d213f; border-radius:6px; margin-top:-1px; }
.pebble { position:absolute; bottom:var(--y); left:var(--x); width:13px; height:13px; border-radius:50%; background:radial-gradient(circle at 30% 23%,#fff,var(--pebble) 52%,var(--edge)); }
.pebble-0 { --x:12%;--y:13%;--pebble:#d9eea5;--edge:#8ca34b;--dx:25px;--dy:-18px;--delay:0ms; }
.pebble-1 { --x:31%;--y:6%;--pebble:#c0a2f9;--edge:#7453b4;--dx:-8px;--dy:-32px;--delay:-160ms; }
.pebble-2 { --x:48%;--y:8%;--pebble:#f5ca89;--edge:#b17a30;--dx:14px;--dy:-22px;--delay:-260ms; }
.pebble-3 { --x:67%;--y:13%;--pebble:#fbadcd;--edge:#ae507b;--dx:-26px;--dy:-29px;--delay:-105ms; }
.pebble-4 { --x:28%;--y:26%;--pebble:#a6ddbd;--edge:#4ca575;--dx:14px;--dy:-26px;--delay:-60ms; }
.pebble-5 { --x:43%;--y:32%;--pebble:#ffe9b6;--edge:#be984d;--dx:-16px;--dy:-14px;--delay:-350ms; }
.pebble-6 { --x:61%;--y:30%;--pebble:#e1b8fa;--edge:#914cb5;--dx:-15px;--dy:-23px;--delay:-490ms; }
[data-active=true] .pebble { animation:tumble .65s var(--ease) var(--delay) infinite alternate; }
@keyframes tumble { 30% { transform:translate(var(--dx),var(--dy)) rotate(90deg); } 76% { transform:translate(4px,-6px) rotate(270deg); } 100% { transform:translate(calc(-.35 * var(--dx)),calc(.8 * var(--dy))) rotate(360deg); } }
.stage-slots { display:grid; gap:7px; min-width:0; flex:1; }
.stage-label { color:#58426e; font-size:.85rem; font-weight:760; }
.balls { --ball-size:36px; display:flex; align-items:center; gap:4px; flex-wrap:wrap; min-width:0; }
.ball { display:inline-grid; width:var(--ball-size,36px); aspect-ratio:1; place-items:center; flex:0 0 auto; border:1px solid #1c132220; border-radius:50%; font-size:.94rem; font-weight:840; font-variant-numeric:tabular-nums; color:#211929; background:#e6d7f8; }
.stage-balls { --ball-size:clamp(24px,3.2vw,42px); }
.ball.slot { border:1px dashed #a48bbd; color:#615577; background:#fff9; }
.ball.n0 { background:#f4df94; }
.ball.n1 { background:#c8dbfc; }
.ball.n2 { background:#f6c2d7; }
.ball.n3 { background:#ded5ea; }
.ball.n4 { background:#d4e7a7; }
.ball.revealed { animation:unveil .32s var(--ease) both; }
@keyframes unveil { from { transform:translate(-15px,-15px) scale(.52); opacity:0; } to { transform:none; opacity:1; } }
.ball.matched { outline:2px solid #542c8b; outline-offset:1px; }
.bonus-plus { color:#322642; font-size:.8rem; font-weight:800; }
.filters { margin-top:12px; border:1px solid var(--border); border-radius:12px; }
.filters summary { padding:8px 11px; }
.filters summary span { float:right; margin-left:5px; color:var(--muted); font-size:.84rem; font-weight:680; }
.filters fieldset { padding:0 11px 10px; }
.filters fieldset p { font-size:.88rem; color:var(--muted); }
.filter-mode { display:flex; align-items:center; flex-wrap:wrap; margin:6px 0; gap:5px 12px; font-size:.9rem; font-weight:730; }
.filter-mode input,.stats-options input { accent-color:#5d3493; }
.filter-mode .text-button { margin-left:auto; }
.number-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(33px,1fr)); gap:4px; }
.number-grid button { min-height:36px; padding:0; border-radius:7px; border:1px solid var(--border); color:var(--ink); background:#fff; font-size:.87rem; font-weight:750; }
.number-grid button:hover { border-color:#8a62bf; }
.number-grid [data-state=fixed] { border-color:#496920; background:#deefbc; }
.number-grid [data-state=excluded] { border-color:#996580; background:#f7d9e6; text-decoration:line-through; }
.filter-summary { padding-top:7px; }
.filter-summary:empty,.status:empty { display:none; }
.actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.status { color:#4d2d76; font-size:.89rem; margin-top:7px; overflow-wrap:anywhere; }
.generated { margin-top:15px; padding-top:13px; border-top:1px solid var(--border); }
.tickets { list-style:none; padding:0; margin-top:8px; display:grid; gap:5px; }
.tickets li { min-width:0; display:flex; align-items:center; flex-wrap:wrap; gap:6px 9px; padding:7px; border:1px solid var(--border); border-radius:10px; background:#faf8fe; }
.tickets .balls { --ball-size:clamp(23px,2.5vw,32px); }
.tickets .text-link { margin-left:auto; font-size:.83rem; }
.ticket-caption { font-size:.83rem; font-weight:760; color:#584668; }
.history > p { color:var(--muted); font-size:.92rem; margin-top:4px; }
textarea { margin-top:7px; width:100%; padding:8px; border:1px solid var(--border); }
.intro { padding:clamp(21px,5vw,48px); }
.intro h1 { font-size:clamp(1.97rem,5vw,3.55rem); }
.intro p,.content-card > p { margin-top:8px; }
.minor { font-size:.9rem; color:var(--muted); }
.content-card form { margin-top:12px; }
.content-card input:not([type=checkbox]),.content-card select { display:block; width:100%; min-width:0; padding:8px 11px; margin-top:4px; border:1px solid #b8afc3; border-radius:9px; background:#fff; min-height:45px; }
.content-card select { appearance:none; padding-inline-end:29px; background-image:linear-gradient(45deg,transparent 49%,#221933 50%),linear-gradient(135deg,#221933 49%,transparent 50%); background-size:6px 6px; background-position:right 16px center,right 10px center; background-repeat:no-repeat; }
.content-card label { font-size:.9rem; font-weight:750; }
.content-card form .minor { margin-top:6px; }
.content-card form .pill { margin-top:11px; }
.comparison-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); gap:9px; }
.match-output { display:grid; gap:7px; margin-top:9px; background:#ece1ff; padding:12px; border:1px solid #d4c2f3; border-radius:12px; }
.table-scroll { overflow-x:auto; max-width:100%; margin-top:10px; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.91rem; }
th,td { padding:8px; border-bottom:1px solid #e8e2ed; }
thead { background:#f4f0f9; }
td .balls { --ball-size:28px; min-width:190px; flex-wrap:nowrap; }
td > .ball { --ball-size:28px; }
td time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.stats-options { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.stats-options label.check { padding:9px 0; }
.frequency-summary { margin-top:10px; color:#453660; font-size:.94rem; font-weight:740; }
.frequency-grid { padding:0; list-style:none; margin-top:8px; display:grid; grid-template-columns:repeat(auto-fit,minmax(64px,1fr)); gap:4px; }
.frequency-grid li { display:flex; align-items:center; justify-content:space-between; gap:2px; padding:6px; border-radius:7px; border:1px solid #ddd5e7; background:#f5f3f8; font-variant-numeric:tabular-nums; }
.frequency-grid [data-heat="1"] { background:#ebe0fa; }
.frequency-grid [data-heat="2"] { background:#ddc7f6; }
.frequency-grid [data-heat="3"] { background:#cdb2f3; }
.frequency-number { font-weight:850; }
.frequency-count { color:#4d3864; font-size:.81rem; }
.content-card details { margin-top:7px; padding:8px 0; border-top:1px solid var(--border); }
summary { font-weight:780; }
.content-card details p { margin-top:6px; }
.sources ul { padding-inline-start:21px; margin-top:8px; }
.sources li { margin-top:4px; font-size:.92rem; }
.footer { border-top:1px solid var(--border); padding-block:12px 19px; }
.footer > p { color:var(--muted); font-size:.89rem; }
@media(min-width:1240px) {
  .portfolio-layout > .main.wrap { width:100%; }
}
@media(max-width:800px) {
  .tool-grid { grid-template-columns:minmax(0,1fr); }
  .quick-info { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:540px) {
  .wrap { width:calc(100% - 26px); }
  .main { margin-top:13px; }
  .nav-row { min-height:0; padding-block:8px; }
  nav a { padding-inline:8px; font-size:.86rem; }
  .hero { min-height:362px; align-items:start; border-radius:21px; }
  .hero-art { width:100%; object-position:66% 70%; }
  .hero::after { background:linear-gradient(180deg,#15101ee8 0%,#15101ed0 44%,#15101e48 72%,#15101e08 100%),linear-gradient(90deg,#15101e90,transparent 83%); }
  .hero-copy { padding:22px; }
  .hero p { margin-top:12px; }
  .hero .pill { margin-top:14px; }
  .quick-info,.guide-grid,.comparison-fields { grid-template-columns:minmax(0,1fr); }
  .draw-stage { gap:7px; padding-inline:6px; }
  .chamber { width:53px; flex-basis:53px; transform:scale(.84); }
  .stage-balls { gap:3px; }
  .filters summary { font-size:.91rem; }
  .filters summary span { font-size:.78rem; }
  th,td { padding-inline:6px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; }
}
