:root {
  color-scheme: dark;
  --bg: #101419;
  --panel: #1a2026;
  --line: #363c41;
  --text: #f6f1e9;
  --muted: #b5b4b0;
  --gold: #efc47e;
  --mint: #a7d9c6;
  font: 16px/1.6 "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary, .corners a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
h1, h2, p, dl, dd, ol, fieldset { margin: 0; }
.skip-link { position: fixed; top: -6rem; left: 1rem; padding: .6rem 1rem; background: var(--panel); z-index: 3; }
.skip-link:focus { top: .5rem; }
.site-top { border-bottom: 1px solid var(--line); background: #12171d; }
.top-row, .top-actions, .brand, .wallet-head, .section-title, .dialog-title { display: flex; align-items: center; }
.top-row { min-height: 66px; justify-content: space-between; gap: 12px; }
.brand { gap: 11px; font: 650 21px/1.15 Georgia, "Yu Mincho", serif; letter-spacing: -.025em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--gold); border-radius: 50%; font: italic bold 19px/1 Georgia, serif; color: var(--gold); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px #81694c; }
.top-actions { gap: 23px; font-size: .82rem; }
.market-link { color: var(--muted); }
.market-link:hover { color: white; text-decoration: underline; }
.outline, .wallet-action, .methods button, .presets button, #retry { border: 1px solid #62625d; border-radius: 6px; background: transparent; color: var(--text); padding: 7px 16px; }
.outline:hover, .methods button:hover, .presets button:hover { border-color: var(--gold); }
.hero { position: relative; display: flex; align-items: center; min-height: 228px; margin-top: 24px; overflow: hidden; border: 1px solid #514439; border-radius: 12px; background: #161719 url("hall.webp") center 52% / cover no-repeat; }
.hero-copy { padding: 29px clamp(24px, 4.5vw, 62px); position: relative; }
.season { font: 600 .68rem/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .2em; color: var(--gold); }
.season span { color: #9c7953; padding-inline: .2em; }
.hero h1 { font: 750 clamp(2.15rem, 4.6vw, 4rem)/1.2 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif; color: #fff6e2; margin: 10px 0; letter-spacing: .035em; }
.hero-copy > p:last-child { font-size: .9rem; color: #ddd8cd; line-height: 1.7; }
.corners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.corners a { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 53px; border: 1px solid var(--line); border-radius: 8px; background: #191e24; color: #d8d7d1; font-size: .95rem; font-weight: 650; }
.corners a:hover { border-color: #8c7a61; }
.corners a[aria-current] { border-color: #ba955a; background: #322d25; color: #ffdaa0; }
.nav-icon { position: relative; display: inline-block; width: 24px; height: 24px; flex: none; color: var(--gold); }
.seven { font: italic bold 28px/.9 Georgia, serif; text-shadow: 2px 1px 0 #825339; }
.pins { background: radial-gradient(circle at 50% 17%, currentColor 2px, transparent 3px), radial-gradient(circle at 27% 46%, currentColor 2px, transparent 3px), radial-gradient(circle at 73% 46%, currentColor 2px, transparent 3px), radial-gradient(circle at 12% 77%, currentColor 2px, transparent 3px), radial-gradient(circle at 50% 77%, currentColor 2px, transparent 3px), radial-gradient(circle at 88% 77%, currentColor 2px, transparent 3px); }
.coins::before, .coins::after { content: ""; position: absolute; width: 15px; height: 8px; left: 2px; top: 9px; border: 1.5px solid currentColor; border-radius: 50%; box-shadow: 0 3px 0 #997a50; }
.coins::after { left: 8px; top: 4px; background: #282722; }
.floor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .38fr); align-items: start; gap: 18px; margin-bottom: 48px; }
.panel { min-width: 0; padding: clamp(16px, 2.3vw, 28px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.sidebar { display: grid; gap: 15px; }
.slot-machines { display: flex; align-items: stretch; gap: 3px; width: fit-content; max-width: 100%; background: #12171c; padding: 3px; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 16px; }
.slot-machines a { display: grid; place-items: center; min-height: 37px; padding: 4px clamp(6px, 1.5vw, 18px); border-radius: 5px; color: var(--muted); font-size: clamp(.75rem, 2.4vw, .84rem); font-weight: 650; }
.slot-machines a:hover { color: var(--text); }
.slot-machines a[aria-current] { color: #ffdc9f; background: #383027; box-shadow: inset 0 0 0 1px #746044; }
h2 { font-size: 1.05rem; line-height: 1.4; }
.section-title, .dialog-title { justify-content: space-between; gap: 8px; }
.section-title { margin-bottom: 17px; }
.section-title h2 { font-size: clamp(1.12rem, 2.1vw, 1.45rem); letter-spacing: .025em; }
.price { color: #ded1b6; font-size: .78rem; background: #262823; border: 1px solid #49483a; border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.price strong { color: var(--gold); }
.machine-meta { flex: none; text-align: right; }
#seat-balance { display: none; font-size: .75rem; color: var(--gold); }
.cabinet { border-radius: 15px; border: 3px solid #916c3f; background: linear-gradient(110deg, #301b21, #832f32 45%, #461f29 86%, #301c23); padding: 7px clamp(20px, 7%, 64px) 24px; box-shadow: inset 0 0 0 2px #f3d49a, inset 0 0 0 6px #2e2323, inset 0 0 0 7px #986851, inset 0 -12px 19px #2e171e; }
.marquee { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 0 11px; }
.marquee b { font: 800 clamp(1.2rem, 2.7vw, 2.35rem)/1.22 Georgia, "Yu Mincho", serif; letter-spacing: .09em; color: #ffe6ad; text-shadow: 1px 2px #633727, 0 1px 9px #d5813e; white-space: nowrap; }
.marquee i { height: 11px; width: 16%; background: radial-gradient(circle, #ffe9bc 1.8px, #d6a258 2.8px, transparent 4px) center / 15px 11px repeat-x; }
.glass { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(3px, 1.1%, 10px); border: 4px solid #3a2d24; padding: 3px; border-radius: 9px; background: #241d1d; box-shadow: 0 0 0 2px #b49563, 0 3px 8px #20141c; }
.glass::before, .glass::after { content: ""; position: absolute; z-index: 1; top: calc(50% - 6px); width: 0; height: 0; border-block: 6px solid transparent; }
.glass::before { left: -13px; border-left: 8px solid #ffd27d; }
.glass::after { right: -13px; border-right: 8px solid #ffd27d; }
.reel { height: clamp(114px, 13vw, 161px); position: relative; overflow: hidden; border-radius: 4px; background: linear-gradient(#817b70 0%, #d5cbb6 13%, #fcf5dc 37%, #fff8e2 50%, #efdfbb 68%, #d0bea0 82%, #736756 100%); box-shadow: inset 0 0 8px #665543; }
.symbol { position: absolute; background-image: url("reels.png"); background-size: 500% 100%; background-repeat: no-repeat; width: clamp(46px, 7.5vw, 92px); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.symbol[data-symbol="0"] { background-position: 0 0; }
.symbol[data-symbol="1"] { background-position: 25% 0; }
.symbol[data-symbol="2"] { background-position: 50% 0; }
.symbol[data-symbol="3"] { background-position: 75% 0; }
.symbol[data-symbol="4"] { background-position: 100% 0; }
.symbol.upper, .symbol.lower { opacity: .37; width: clamp(30px, 6vw, 72px); filter: blur(.5px); }
.symbol.upper { top: -10%; }
.symbol.lower { top: 110%; }
.cabinet[data-model="juggler"] {
  border-color: #855578; background: radial-gradient(ellipse at top, #a34275, transparent 70%), repeating-linear-gradient(116deg, #42203e 0 18px, #522243 19px 38px);
  box-shadow: inset 0 0 0 2px #edbda5, inset 0 0 0 6px #3e2337, inset 0 0 0 7px #a46991;
}
.cabinet[data-model="juggler"] .marquee b { color: #fff0dc; text-shadow: 2px 2px #8a3254, 0 0 12px #ed829a; font-style: italic; }
.cabinet[data-model="god"] {
  border-color: #a78b4d; background: radial-gradient(ellipse at top, #274975, transparent 69%), repeating-linear-gradient(90deg, #17243b 0 15px, #1d2c46 16px 19px, #142136 21px 36px);
  box-shadow: inset 0 0 0 2px #e5c77f, inset 0 0 0 6px #172439, inset 0 0 0 7px #a4894c;
}
.cabinet[data-model="god"] .marquee b { color: #ffe1a1; text-shadow: 1px 2px #684915, 0 0 14px #8c692e; }
.cabinet[data-model="god"] .marquee i { height: 6px; background: repeating-linear-gradient(130deg,#d6af68 0 3px,transparent 3px 7px); }
.cabinet[data-model="juggler"] .symbol, .cabinet[data-model="god"] .symbol { background-image: url("machine-reels.png"); background-size: 500% 200%; }
.cabinet[data-model="god"] .symbol { background-position-y: 100%; }
.reel-stops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 9px 0 0; }
.reel-stops button { justify-self: center; width: min(72%, 66px); min-height: 32px; color: #491322; background: radial-gradient(ellipse at 45% 25%, #ffe1e7, #ed8fa2 55%, #bb4e71); border: 2px solid #e3b5ae; border-radius: 14px; box-shadow: 0 3px 0 #321a25; font: 750 .65rem/1 ui-monospace, monospace; letter-spacing: .06em; }
.cabinet[data-model="god"] .reel-stops button { color: #443113; background: radial-gradient(ellipse at 45% 25%,#fff3c4,#e2bd72 60%,#ac813c); border-color: #e6cd90; }
.reel-stops button:disabled { opacity: .58; }
.reel-stops button:enabled:active { transform: translateY(2px); }
.bonus-panel { display: flex; gap: 12px; align-items: center; margin: 11px auto 0; width: fit-content; max-width: 100%; padding: 4px 12px 4px 5px; background: #17151e; border: 1px solid #77647a; border-radius: 7px; }
#bonus-lamp { color: #c4a4c0; padding: 5px 9px; border: 1px solid #755572; border-radius: 4px; font: italic 800 clamp(.86rem,2.4vw,1.12rem)/1 Georgia, serif; letter-spacing: .035em; white-space: nowrap; }
#bonus-meter { font-size: .77rem; color: #eee4e2; font-variant-numeric: tabular-nums; }
.bonus-panel.lit #bonus-lamp { color: #fff5fe; background: #903c93; border-color: #ffbaf4; box-shadow: 0 0 12px #ff81ee91; text-shadow: 0 0 5px #ffd8fc; }
.cabinet[data-model="god"] #bonus-lamp { color: #d3bd8d; border-color: #7c704e; }
.cabinet[data-model="god"] .bonus-panel.lit #bonus-lamp { color: #fff5d5; background: #795319; border-color: #ffe297; box-shadow: 0 0 12px #ffd78485; }
#board { display: block; background: #0d161c; border-radius: 12px; width: 100%; height: auto; aspect-ratio: 720/255; }
.lane-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; border: 0; padding: 0; margin-top: 14px; }
.lane-picker legend { float: left; padding: 6px 10px 0 0; color: var(--muted); font-size: .83rem; }
.lane-picker label { position: relative; cursor: pointer; }
.lane-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lane-picker span { display: block; min-width: 44px; text-align: center; border: 1px solid #545b5d; border-radius: 5px; font-size: .84rem; padding: 4px 9px; }
.lane-picker :checked + span { background: #3b362d; border-color: var(--gold); color: #ffdb9e; }
.lane-picker :focus-visible + span { outline: 2px solid var(--mint); }
.primary { display: block; width: 100%; border: 1px solid #f7d699; border-radius: 7px; padding: 11px 16px; background: linear-gradient(100deg, #f1cc8d, #e6b66f); color: #302216; font-weight: 750; }
.primary:hover:enabled { background: #f8d8a0; }
.play { margin-top: 18px; }
.result { min-height: 1.7em; margin: 10px 0 14px; color: #d7d1c6; text-align: center; font-size: .88rem; }
.result.win { color: var(--mint); font-weight: 700; }
.rules { border-top: 1px solid var(--line); padding-top: 12px; font-size: .85rem; }
.rules summary { color: #dfd8ca; cursor: pointer; width: fit-content; }
#rules-text { padding-top: 7px; line-height: 1.8; color: var(--muted); }
.wallet { border-color: #50483c; background: linear-gradient(135deg, #2a2926, #1b2025 86%); }
.wallet-head { gap: 8px; }
.wallet-icon { color: var(--gold); font-size: 1.3rem; }
.balance { margin: 5px 0 14px; color: var(--gold); overflow-wrap: anywhere; }
.balance strong { font: 600 clamp(2rem, 3.2vw, 2.8rem)/1.2 Georgia, serif; font-variant-numeric: tabular-nums; }
.balance span { font-size: .85rem; }
.cash, .quote { border-top: 1px solid var(--line); padding-top: 10px; font-size: .85rem; }
.cash div, .quote div { display: flex; justify-content: space-between; gap: 10px; margin: 5px 0; }
dt { color: var(--muted); }
dd { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-action { color: var(--gold); border-color: #96774c; width: 100%; margin-top: 12px; font-weight: 650; }
.wallet-action:hover { background: #383127; }
.history { padding-block: 18px; }
#history { list-style: none; padding: 0; max-height: 17rem; overflow-y: auto; }
#history li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
#history li:last-child { border-bottom: 0; padding-bottom: 0; }
#history time { display: block; font-size: .72rem; color: var(--muted); }
#history strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gain { color: var(--mint); }
#empty-history, .single-way { color: var(--muted); font-size: .83rem; margin-top: 8px; }
.notice { margin: 0 0 14px; padding: 9px 13px; border: 1px solid #69583f; border-radius: 6px; color: #f5d9a7; background: #2f2922; }
#retry { font-size: .83rem; padding: 3px 8px; margin-left: 8px; }
dialog { width: min(420px, calc(100% - 28px)); max-height: 92dvh; overflow-y: auto; color: var(--text); background: #1e242a; border: 1px solid #665b49; border-radius: 12px; padding: 24px; box-shadow: 0 16px 80px #0009; }
dialog::backdrop { background: rgb(6 9 14 / 79%); }
.dialog-title { margin-bottom: 14px; }
.dialog-title h2 { font-size: 1.36rem; }
[data-close] { background: transparent; color: var(--muted); border: 0; font-size: 1.5rem; width: 36px; }
dialog form label { display: block; margin-block: 14px 9px; font-size: .9rem; }
dialog input { display: block; margin-top: 5px; width: 100%; background: #13181e; color: var(--text); border: 1px solid #64676b; border-radius: 6px; padding: 8px 10px; }
.methods, .presets { display: flex; gap: 6px; margin-block: 12px; }
.methods button, .presets button { flex: 1; font-size: .8rem; padding: 6px 4px; }
.methods [aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.form-error { color: #ffbfac; font-size: .85rem; }
.form-error:not(:empty) { margin: 8px 0; }
dialog .primary, #logout { margin-top: 14px; }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 28px); }
  .top-row { min-height: 53px; }
  .top-actions { gap: 12px; }
  .hero { min-height: 170px; margin-top: 14px; background-position: 62% center; }
  .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#080b12d6, #080b127d 53%, transparent); }
  .hero-copy { padding: 21px; }
  .hero-copy > p:last-child { font-size: .81rem; }
  .corners { gap: 5px; margin: 12px 0; }
  .corners a { gap: 5px; min-height: 58px; flex-direction: column; font-size: clamp(.67rem, 2.6vw, .9rem); line-height: 1.2; }
  .nav-icon { transform: scale(.82); }
  .floor { grid-template-columns: 1fr; gap: 13px; }
  #seat-balance { display: inline-block; }
  .sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .panel { padding: 15px; }
  .cabinet { padding-bottom: 16px; }
  .marquee { padding-block: 6px; }
}
@media (max-width: 460px) {
  .brand { font-size: 17px; gap: 6px; }
  .top-row { flex-wrap: wrap; row-gap: 6px; padding-block: 8px; }
  .top-actions { flex-wrap: wrap; gap: 8px; font-size: .74rem; }
  .market-link { white-space: nowrap; }
  #session-button { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .outline { padding: 6px 9px; }
  .sidebar { grid-template-columns: 1fr; }
  .cash, .quote { font-size: .88rem; }
}

#slot-cabinet {
  --trim: #d9b56b;
  position: relative;
  isolation: isolate;
  max-width: 850px;
  margin-inline: auto;
  border-width: 5px;
  padding: clamp(10px,1.7vw,18px) clamp(22px,7%,63px) clamp(19px,2.6vw,30px);
  box-shadow: inset 0 0 0 2px #fae4b3,inset 0 0 0 6px #2a2624,inset 0 0 0 8px #a38b68,
              inset 0 -15px 18px #170f1ac7,0 7px 16px #08141fb3;
}
#slot-cabinet[data-model="juggler"] { --trim: #efb7cf; }
#slot-cabinet[data-model="god"] { --trim: #e0c88a; }
#slot-cabinet::before, #slot-cabinet::after {
  content: ""; position:absolute; top:13%; bottom:15%; width:clamp(5px,1.1%,9px);
  border:1px solid #392c27; border-radius:100% / 7%; pointer-events:none;
  background: repeating-linear-gradient(0deg,#291d1f 0 2px,transparent 3px 10px),
              linear-gradient(90deg,#5b4438,var(--trim) 35%,#fff7dd 55%,var(--trim) 73%,#493d39);
  box-shadow: 0 0 0 1px #796852;
}
#slot-cabinet::before {left:2.5%}
#slot-cabinet::after {right:2.5%}
#slot-cabinet .marquee {
  min-height:clamp(58px,9vw,97px); margin-bottom:10px; padding:8px 6px; position:relative;
  border:2px solid #ac9678; border-radius:9px 9px 4px 4px;
  background: linear-gradient(96deg,#1b191513,#25131c77 43%,#22151c77 56%,#120f120b),
              url("slot-backglass.webp") center top / 100% 300% no-repeat,#3c2924;
  box-shadow: inset 0 0 0 2px #211e20,inset 0 1px 9px #120c15,0 3px 4px #17121b;
}
#slot-cabinet[data-model="juggler"] .marquee { background-position: center,center center; }
#slot-cabinet[data-model="god"] .marquee { background-position: center,center bottom; }
#slot-cabinet .marquee i { display:none; }
#slot-cabinet .marquee b {letter-spacing:.075em; text-shadow:0 2px 2px #0c0808,0 0 7px #100916,1px 1px #f4d8a8;}
#slot-cabinet .glass {
  border:5px solid #29282a; padding:4px;gap:5px;
  background:linear-gradient(90deg,#2c2320,#deccaf 32%,#4d423b 34%,#dec9a5 66%,#3b352d 68%,#ac9271);
  box-shadow:inset 0 0 0 1px #d9c098,0 0 0 1px #ac9372,0 0 0 4px #342926,0 7px 8px #0d0d168a;
}
#slot-cabinet .reel {height:clamp(118px,15vw,177px);}
#slot-cabinet .symbol {width:clamp(43px,9vw,98px);filter:none;}
#slot-cabinet .reel::after {
  content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
  background:linear-gradient(180deg,#22180f94,#ffffff2e 17%,transparent 39%,transparent 62%,#3c241417 74%,#24150c94);
  box-shadow:inset 3px 0 6px #493d3063,inset -2px 0 5px #4637285e;
}
.slot-counters {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px auto 3px;padding:0 3px;}
.slot-counters span {
  display:inline-flex;align-items:baseline;gap:5px;color:#e7d5b6;font:600 clamp(10px,1.5vw,12px)/1.6 sans-serif;
  background:linear-gradient(#211d1a,#151514);border:1px solid #94816e;border-radius:5px;padding:2px 8px;
  box-shadow:inset 0 1px 4px #030609;
}
.slot-counters b {color:#ffc575;font:650 clamp(13px,2vw,20px)/1.2 var(--lobby-font,monospace);font-variant-numeric:tabular-nums;}
#slot-cabinet.pays #slot-payout-readout {color:#f4e99c;text-shadow:0 0 7px #f5ba67;}
#slot-cabinet.pays .glass {border-color:#766043;}
#slot-cabinet .reel-stops button {border-bottom-width:4px;min-height:37px;}
#board {aspect-ratio:720 / 380;max-width:850px;margin-inline:auto;border:1px solid #8b775b;box-shadow:0 5px 14px #06101877;}
@media(max-width:420px) {
  #slot-cabinet {padding-inline:16px;}
  .slot-counters {gap:3px;}
  .slot-counters span {padding:2px 4px;gap:3px;}
}
