/* えびす福札 — モチーフ：十日戎の夜の授与所。漆黒・朱・金。動きは太鼓の一打（打つ→止まる→余韻） */
:root {
  --kuro: #0b0809;
  --kuro2: #17110f;
  --shu: #c8312b;
  --shu-d: #7d1712;
  --kin: #e2b553;
  --kin-l: #fff1c2;
  --kinari: #f3ead7;
  --sasa: #4f8a47;
  --gold: linear-gradient(135deg, #7a5418 0%, #f6e7a8 20%, #c9952f 38%, #fff6d0 50%, #b07d22 66%, #f1d27a 84%, #6d4a14 100%);
  --silver: linear-gradient(135deg, #5f6873 0%, #f4f7fb 22%, #a9b3bf 40%, #ffffff 52%, #8792a0 70%, #dfe5ec 86%, #545c66 100%);
  --rainbow: linear-gradient(90deg, #ff5a5a, #ffb84d, #fff27a, #6dff9c, #5ad7ff, #8a7dff, #ff6ad5, #ff5a5a);
  --f-mincho: 'Shippori Mincho B1', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', serif;
  --f-fude: 'Yuji Syuku', 'Shippori Mincho B1', 'Yu Mincho', serif;
  --f-geki: 'Dela Gothic One', 'Shippori Mincho B1', sans-serif;
  --cw: 260px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--kuro); color: var(--kinari); font-family: var(--f-mincho); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ── 背景（授与所） */
#bg { position: fixed; inset: 0; background: url(../img/bg_sando.webp) center 40% / cover no-repeat; }
#bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(11,8,9,.38), rgba(11,8,9,.38)), radial-gradient(ellipse 60% 55% at 50% 52%, rgba(11,8,9,.15), rgba(11,8,9,.82) 78%), linear-gradient(180deg, rgba(11,8,9,.55), transparent 25%, transparent 70%, rgba(11,8,9,.9)); }
#dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ── 上の帯 */
#top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: linear-gradient(180deg, rgba(11,8,9,.92), rgba(11,8,9,0)); }
#top .logo { font-weight: 800; font-size: 20px; letter-spacing: .12em; white-space: nowrap; }
#top .logo b { color: var(--kin); }
#top .logo small { display: block; font-size: 10px; letter-spacing: .2em; color: #b9a98c; font-weight: 500; }
#top .sp { flex: 1; }
.purse { display: flex; gap: 8px; }
.coin { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(23,17,15,.85); border: 1px solid rgba(226,181,83,.45); font-weight: 800; font-size: 15px; white-space: nowrap; }
.coin i { width: 20px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 1.5px rgba(120,80,20,.7); display: inline-block; }
.coin.sen i { width: 16px; height: 16px; background: radial-gradient(circle, transparent 3px, #c7a15a 3.5px, #8a6a2c 7px, #c7a15a 8px); border-radius: 50%; box-shadow: none; }
.coin small { font-size: 10px; color: #b9a98c; font-weight: 500; }
.navs { display: flex; gap: 8px; }
.tbtn { white-space: nowrap; border: 1px solid rgba(226,181,83,.5); background: rgba(23,17,15,.85); border-radius: 6px; padding: 7px 12px; font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.tbtn:hover { background: rgba(60,30,20,.9); border-color: var(--kin); }
.tbtn.icon { width: 38px; padding: 7px 0; }

/* ── 授与所（ホーム） */
#home { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 16px 24px; z-index: 5; }
.shrine-title { text-align: center; margin-bottom: 18px; }
.shrine-title .kicker { font-size: 13px; letter-spacing: .5em; color: var(--kin); text-indent: .5em; }
.shrine-title h1 { margin: 6px 0 4px; font-family: var(--f-fude); font-weight: 400; font-size: clamp(54px, 11vw, 112px); line-height: 1; letter-spacing: .06em; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(200,49,43,.55)); }
.shrine-title p { margin: 0; font-size: 14px; color: #d9cbb0; letter-spacing: .14em; }
.pulls { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 14px 0 12px; }
.pull { position: relative; width: 250px; padding: 16px 18px 14px; border: none; border-radius: 6px; background: linear-gradient(180deg, #d63a2f, #8e1a14); box-shadow: 0 0 0 2px #2a0b08, 0 0 0 4px #e2b553, 0 10px 30px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,220,180,.35); text-align: center; transition: transform .12s ease-out, filter .12s; }
.pull:hover { transform: translateY(-2px); filter: brightness(1.08); }
.pull:active { transform: translateY(2px) scale(.98); }
.pull .t { display: block; font-size: 30px; font-weight: 800; letter-spacing: .14em; color: #fff4dc; text-shadow: 0 2px 0 #5c0f0c; }
.pull .c { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 15px; font-weight: 800; color: var(--kin-l); }
.pull .c i { width: 18px; height: 12px; border-radius: 50%; background: var(--gold); display: inline-block; }
.pull .g { position: absolute; top: -12px; right: -8px; background: var(--gold); color: #3a2208; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 3px; transform: rotate(4deg); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.pull.ten { background: linear-gradient(180deg, #2a1d14, #0f0a08); box-shadow: 0 0 0 2px #000, 0 0 0 4px #e2b553, 0 10px 30px rgba(0,0,0,.6), inset 0 0 30px rgba(226,181,83,.18); }
.pull.ten .t { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.pull:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; transform: none; }
.subline { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: #cdbd9f; }
.subline a { color: var(--kin); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.progress { width: min(520px, 92vw); margin-top: 18px; }
.progress .bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; border: 1px solid rgba(226,181,83,.3); }
.progress .bar b { display: block; height: 100%; background: var(--gold); }
.progress .lbl { display: flex; justify-content: space-between; font-size: 12px; color: #cdbd9f; margin-top: 5px; letter-spacing: .06em; }
.recent { display: flex; gap: 6px; margin-top: 14px; min-height: 64px; }
.recent:empty { display: none; }
.pickup { margin-top: 22px; text-align: center; }
.pickup .lab { font-size: 12px; letter-spacing: .4em; color: var(--kin); margin-bottom: 10px; text-indent: .4em; }
.pickup .row { display: flex; justify-content: center; align-items: flex-end; }
.pickup .card { --cw: clamp(92px, 9vw, 150px); margin: 0 -6px; cursor: pointer; transition: transform .25s ease-out; }
.pickup .card:nth-child(1) { transform: rotate(-7deg) translateY(10px); }
.pickup .card:nth-child(3) { transform: rotate(7deg) translateY(10px); }
.pickup .card:nth-child(2) { z-index: 1; transform: translateY(-6px); }
.pickup .card:hover { transform: translateY(-14px) scale(1.04); z-index: 2; }
.recent .card { --cw: 46px; }

/* ── 札 */
.card { position: relative; width: var(--cw); aspect-ratio: 63 / 88; font-size: calc(var(--cw) / 18); perspective: calc(var(--cw) * 3.5); flex: none; }
.c-body { position: absolute; inset: 0; border-radius: .6em; overflow: hidden; transform-style: preserve-3d; will-change: transform; background: #222; box-shadow: 0 .4em 1.2em rgba(0,0,0,.55); --mx: 50%; --my: 50%; --px: 50%; --py: 50%; --hyp: 0; }
.card.lite .c-body { will-change: auto; box-shadow: none; }
.card.lite .c-art { box-shadow: inset 0 0 0 .07em var(--line); }
.card.lite .c-frame::after, .card.lite .c-namebox, .card.lite .c-text { box-shadow: none; }
.c-frame { position: absolute; inset: 0; background: var(--frame); }
.c-frame::after { content: ''; position: absolute; inset: .32em; border-radius: .4em; box-shadow: inset 0 0 0 .09em var(--line), 0 0 0 .06em rgba(0,0,0,.35); }
.c-head { position: absolute; top: .55em; left: .62em; right: .62em; height: 1.3em; display: flex; align-items: center; gap: .4em; font-size: 1em; }
.c-rar { font-family: var(--f-geki); font-size: .82em; padding: .08em .45em; border-radius: .2em; background: var(--rar-bg); color: var(--rar-fg); letter-spacing: .04em; line-height: 1.25; }
.c-ser { font-size: .66em; font-weight: 800; color: var(--head-fg); letter-spacing: .14em; }
.c-no { margin-left: auto; font-size: .58em; color: var(--head-fg); opacity: .85; letter-spacing: .05em; font-family: var(--f-mincho); }
.c-art { position: absolute; top: 2.05em; left: .62em; right: .62em; height: 12.35em; border-radius: .25em; overflow: hidden; background-color: var(--art-bg); background-size: 1.6em auto; box-shadow: inset 0 0 0 .07em var(--line), inset 0 0 2.2em rgba(0,0,0,.45); }
.c-art::before { content: ''; position: absolute; inset: 0; background: var(--art-glow); }
.a-cw { position: absolute; inset: 9% 13% 9% 13%; filter: drop-shadow(0 .12em .1em rgba(0,0,0,.55)); }
.card.lite .a-cw { filter: none; }
.a-crest { position: absolute; inset: 0; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; background: var(--crest); background-size: cover; }
.a-crest-faint { inset: 6% 18%; opacity: .16; }
/* 顔写真の札：薄い家紋＋光＋金の丸枠（黒い枠にしない＝遺影に見せない） */
.a-rays { position: absolute; inset: -30%; background: repeating-conic-gradient(from 0deg at 50% 50%, var(--ray, rgba(255,230,160,.16)) 0deg 7deg, transparent 7deg 18deg); }
.a-fcrest { position: absolute; inset: 4% 2%; opacity: .2; }
.a-fcrest .a-crest { inset: 0; }
.a-medal { position: absolute; left: 50%; top: 50%; height: 86%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; padding: .28em; background: var(--ring); box-shadow: 0 0 1.4em var(--halo), 0 .2em .5em rgba(0,0,0,.45); }
.a-medal::after { content: ''; position: absolute; inset: .28em; border-radius: 50%; box-shadow: inset 0 0 0 .08em rgba(255,255,255,.55), inset 0 -.6em 1.2em rgba(0,0,0,.18); pointer-events: none; }
.a-face { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #ddd; }
.a-face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; user-select: none; }
.card.lite .a-medal { box-shadow: none; padding: .22em; }
/* 顔には虹の光を掛けない（丸枠の内側だけ光の層を抜く） */
.has-photo .c-shine, .has-photo .c-sparkle { -webkit-mask: radial-gradient(ellipse 28% 20% at 50% 32.7%, transparent 97%, #000 100%); mask: radial-gradient(ellipse 28% 20% at 50% 32.7%, transparent 97%, #000 100%); }
.card.lite .a-rays { display: none; }
.r-ssr { --ring: var(--gold); --halo: rgba(255,210,110,.55); --ray: rgba(255,220,140,.14); }
.r-ur { --ring: linear-gradient(135deg, #fff1c2, #e2b553 30%, #ffffff 48%, #c9952f 65%, #fff1c2); --halo: rgba(255,180,90,.7); --ray: rgba(255,230,170,.2); }
.r-ebs { --ring: conic-gradient(#ffd1e8, #fff3b0, #c9ffd8, #c8ecff, #e3d4ff, #ffd1e8); --halo: rgba(230,200,255,.75); --ray: rgba(255,255,255,.14); }
.s-rekidai .c-art, .s-yakuin .c-art { background-size: 1.6em auto; }
.card.lite .a-crest { -webkit-mask: none; mask: none; }
.a-fam { position: absolute; left: .25em; top: .1em; font-family: var(--f-fude); font-size: 4.2em; line-height: 1; color: var(--fam); opacity: .5; pointer-events: none; }
.a-stamp { position: absolute; right: .45em; bottom: .45em; min-width: 2.2em; height: 2.2em; padding: .2em; display: grid; place-items: center; background: #b8261f; color: #fff2e0; font-weight: 800; font-size: .74em; line-height: 1.05; border-radius: .18em; transform: rotate(-4deg); box-shadow: inset 0 0 0 .12em #fff2e0, inset 0 0 0 .2em #b8261f, inset 0 0 .6em rgba(0,0,0,.35); letter-spacing: .02em; text-align: center; }
.a-stamp.long { writing-mode: vertical-rl; height: auto; min-height: 2.8em; padding: .35em .3em; }
.a-sho { position: absolute; inset: 6% 8%; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font-family: var(--f-fude); line-height: 1.25; color: var(--sho); text-align: center; letter-spacing: .04em; text-shadow: 0 .03em .1em rgba(0,0,0,.35); }
.a-year { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 4.4em; line-height: 1; background: var(--year); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.02em; }
.a-year small { font-size: .32em; margin-top: .2em; letter-spacing: .1em; }
.a-noren { position: absolute; left: 8%; right: 8%; top: 9%; height: 64%; display: flex; gap: 3%; }
.a-noren::before { content: ''; position: absolute; left: -5%; right: -5%; top: -5%; height: .45em; border-radius: .2em; background: linear-gradient(180deg, #8a6a3c, #4a3418); box-shadow: 0 .1em .2em rgba(0,0,0,.5); }
.a-noren i { flex: 1; background: linear-gradient(180deg, #b52a22, #7d1712); box-shadow: inset 0 -.2em .4em rgba(0,0,0,.35); border-radius: 0 0 .15em .15em; }
.a-noren b { position: absolute; left: 14%; right: 14%; top: 20%; height: 52%; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; background: #fff4e2; opacity: .92; }
.a-gpno { position: absolute; left: 0; right: 0; bottom: 7%; text-align: center; font-weight: 800; font-size: 1.5em; letter-spacing: .12em; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-namebox { position: absolute; top: 14.62em; left: .62em; right: .62em; height: 4.15em; padding: .32em .5em .1em; background: var(--paper); border-radius: .2em .2em 0 0; box-shadow: inset 0 0 0 .06em var(--line); overflow: hidden; }
.c-name { font-weight: 800; color: var(--ink); line-height: 1.12; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-shoshin .c-name, .s-nenpyo .c-name, .s-gp .c-name, .s-katsudo .c-name, .s-meiyu .c-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c-sub { font-size: .62em; color: var(--ink2); margin-top: .25em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .03em; }
.c-sub2 { font-size: .58em; color: var(--accent); font-weight: 800; letter-spacing: .06em; }
.c-text { position: absolute; top: 18.85em; left: .62em; right: .62em; bottom: 1.85em; padding: .3em .55em; background: var(--paper2); border-radius: 0 0 .2em .2em; box-shadow: inset 0 0 0 .06em var(--line); overflow: hidden; }
.c-flavor { margin: 0; font-size: .6em; line-height: 1.5; color: var(--ink); }
.c-apps { margin: 0; padding: 0; list-style: none; font-size: .54em; line-height: 1.38; color: var(--ink); }
.c-apps li { padding-left: .9em; text-indent: -.9em; margin-bottom: .18em; }
.c-apps li::before { content: '◆'; color: var(--accent); font-size: .7em; margin-right: .35em; }
.c-apps li.more { color: var(--ink2); }
.c-apps li.more::before { content: ''; margin: 0; }
.c-foot { position: absolute; left: .7em; right: .7em; bottom: .48em; height: 1.2em; display: flex; justify-content: space-between; align-items: center; font-size: .6em; font-weight: 800; color: var(--head-fg); letter-spacing: .2em; }
.c-mark { font-family: var(--f-fude); font-size: 1.5em; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 光の層（札を傾けると動く。pokemon-cards-css の考え方を自前で） */
.c-shine, .c-sparkle, .c-glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.c-shine { mix-blend-mode: color-dodge; opacity: 0; transition: opacity .35s; background-image: repeating-linear-gradient(115deg, rgba(255,90,90,.0) 0%, rgba(255,90,90,.42) 3%, rgba(255,214,90,.42) 6%, rgba(110,255,160,.42) 9%, rgba(90,200,255,.42) 12%, rgba(170,120,255,.42) 15%, rgba(255,90,200,.0) 18%), repeating-linear-gradient(60deg, rgba(0,0,0,.5) 0 .15em, rgba(255,255,255,.1) .15em .3em); background-size: 300% 300%, 1.1em 1.1em; background-position: var(--px) var(--py), center; }
.c-sparkle { opacity: 0; mix-blend-mode: color-dodge; transition: opacity .35s; background-image: radial-gradient(circle, rgba(255,240,200,.95) 0 .05em, transparent .09em), radial-gradient(circle, rgba(255,255,255,.85) 0 .04em, transparent .08em); background-size: .93em 1.07em, 1.31em .87em; background-position: calc(var(--px) * .4) calc(var(--py) * .3), calc(var(--px) * -.3) calc(var(--py) * .5); }
.c-glare { opacity: 0; mix-blend-mode: overlay; transition: opacity .3s; background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255,255,255,.85) 0%, rgba(255,255,255,.25) 22%, rgba(0,0,0,.45) 85%); }
.card.active .c-glare, .card.show .c-glare { opacity: .65; }
/* 銀札・金札は絵の窓だけ光る。朱金札・螺鈿札・極は札全体 */
.r-sr .c-shine, .r-ssr .c-shine { clip-path: inset(8.2% 3.4% 42.4% 3.4% round .25em); opacity: .35; }
.r-sr.active .c-shine, .r-ssr.active .c-shine, .r-sr.show .c-shine, .r-ssr.show .c-shine { opacity: .55; }
.r-ssr .c-sparkle, .r-ur .c-sparkle, .r-ebs .c-sparkle { opacity: .45; }
.r-ssr.active .c-sparkle, .r-ur.active .c-sparkle, .r-ebs.active .c-sparkle { opacity: .9; }
.r-ur .c-shine { opacity: .3; }
.r-ur.active .c-shine, .r-ur.show .c-shine { opacity: .55; }
.r-ebs .c-shine { opacity: .22; background-image: url(../img/tex_raden.webp), repeating-linear-gradient(115deg, rgba(255,90,90,.0) 0%, rgba(255,90,90,.5) 4%, rgba(90,200,255,.5) 8%, rgba(255,90,200,.0) 12%); background-size: 60% auto, 300% 300%; }
.r-ebs.active .c-shine, .r-ebs.show .c-shine { opacity: .5; }
.r-ebs .a-cw { filter: drop-shadow(0 0 .12em #fff3c4) drop-shadow(0 0 .5em rgba(255,230,170,.55)); }
.card.lite.r-ebs .a-cw { filter: none; }
.kira .c-shine { clip-path: none; opacity: .55; }
.kira.active .c-shine, .kira.show .c-shine { opacity: .95; }
.kira .c-body { box-shadow: 0 0 .9em rgba(255,240,200,.55), 0 .4em 1.2em rgba(0,0,0,.55); }
@keyframes hue { to { filter: brightness(.8) contrast(1.3) saturate(1.4) hue-rotate(360deg); } }

/* 材の段 */
.r-n { --frame: repeating-linear-gradient(94deg, #cdb38a 0 .2em, #c2a77c .2em .5em, #d8c29b .5em .62em, #c9ae84 .62em .9em); --line: rgba(110,80,40,.55); --rar-bg: #6b5236; --rar-fg: #f6ead2; --head-fg: #4a3826; --art-bg: #efe3c8; --art-glow: radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.5), transparent 65%); --crest: #3a2a22; --fam: #8a6a48; --paper: #f6eedd; --paper2: #f1e7d2; --ink: #2b211b; --ink2: #6d5a46; --accent: #a5432f; --sho: #2b211b; --year: linear-gradient(180deg, #5a4030, #2b211b); }
.r-r { --frame: linear-gradient(160deg, #2b4a8a, #12204a 60%, #0c1735); --line: rgba(200,215,240,.75); --rar-bg: #c9d4e6; --rar-fg: #12204a; --head-fg: #d5def0; --art-bg: #17284f; --art-glow: radial-gradient(ellipse at 50% 42%, rgba(120,160,230,.45), transparent 70%); --crest: linear-gradient(160deg, #ffffff, #b8c6dd 45%, #eef3fb 60%, #8fa0bd); --fam: #9fb4dc; --paper: #eef2f8; --paper2: #e6ebf3; --ink: #14203d; --ink2: #4a5878; --accent: #2b4a8a; --sho: #eef3fb; --year: linear-gradient(180deg, #ffffff, #9fb4dc); }
.r-sr { --frame: var(--silver); --line: rgba(60,70,82,.7); --rar-bg: #2c343e; --rar-fg: #f4f7fb; --head-fg: #1f262e; --art-bg: #26303b; --art-glow: radial-gradient(ellipse at 50% 42%, rgba(200,215,235,.4), transparent 70%); --crest: var(--silver); --fam: #c5cfdb; --paper: #f2f4f7; --paper2: #e9edf1; --ink: #1d232b; --ink2: #56606c; --accent: #4f5d70; --sho: #f4f7fb; --year: var(--silver); }
.r-ssr { --frame: var(--gold); --line: rgba(255,236,170,.75); --rar-bg: #1a120c; --rar-fg: #f6d77e; --head-fg: #3a2208; --art-bg: #1b110b; --art-glow: radial-gradient(ellipse at 50% 42%, rgba(240,190,90,.35), transparent 70%); --crest: var(--gold); --fam: #c9952f; --paper: #1d1510; --paper2: #160f0b; --ink: #f6e7c4; --ink2: #c9b48a; --accent: #e2b553; --sho: #f6d77e; --year: var(--gold); }
.r-ur { --frame: linear-gradient(150deg, #e04a3a, #a3231c 40%, #6e130f 75%, #b8352a); --line: #f1c75e; --rar-bg: var(--gold); --rar-fg: #4a0c08; --head-fg: #ffe3a6; --art-bg: #6e130f; --art-glow: radial-gradient(ellipse at 50% 42%, rgba(255,170,90,.5), transparent 72%); --crest: var(--gold); --fam: #f1c75e; --paper: #2a0d0b; --paper2: #220a08; --ink: #ffe9c0; --ink2: #e9b98a; --accent: #f1c75e; --sho: #ffe3a6; --year: var(--gold); }
.r-ur .c-frame::after { box-shadow: inset 0 0 0 .14em #f1c75e, inset 0 0 0 .24em #6e130f, inset 0 0 0 .3em #f1c75e; }
.r-ebs { --frame: url(../img/tex_raden.webp) 0 0 / 9em auto, #0a0710; --line: #f1d27a; --rar-bg: var(--rainbow); --rar-fg: #1a0f22; --head-fg: #fff8e6; --art-bg: #0c0812; --art-glow: radial-gradient(ellipse at 50% 42%, rgba(190,160,255,.35), transparent 72%); --crest: linear-gradient(135deg, #ffd1e8, #fff3b0 22%, #c9ffd8 42%, #c8ecff 62%, #e3d4ff 80%, #ffd1e8); --fam: #e6d6ff; --paper: #0e0b14; --paper2: #0a080f; --ink: #f6eedc; --ink2: #cdbfe0; --accent: #f1d27a; --sho: #fff8e6; --year: linear-gradient(90deg, #ffd1d1, #fff3b0, #c9ffd8, #c8ecff, #e3d4ff); }
.r-ebs .c-frame { animation: raden 24s linear infinite; }
.r-ebs .c-frame::after { box-shadow: inset 0 0 0 .14em #f1d27a, inset 0 0 0 .22em #0a0710, inset 0 0 0 .27em #f1d27a; }
.r-ebs .c-head { text-shadow: 0 0 .3em #000, 0 0 .1em #000; }
.r-ebs .c-foot { color: #fff8e6; text-shadow: 0 0 .3em #000; }
@keyframes raden { to { background-position: 18em 9em, 0 0; } }
.card.lite .c-frame { animation: none; }
.r-ssr .c-head .c-ser, .r-ssr .c-no, .r-ssr .c-foot { color: #3a2208; }
.r-sr .c-foot { color: #2c343e; }
.s-shoshin .c-art { background-color: color-mix(in srgb, var(--art-bg) 85%, #f3ead7); }

/* 札の裏 */
.cback { position: absolute; inset: 0; border-radius: .6em; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2a1a14, #0b0809 75%); box-shadow: inset 0 0 0 .32em #0b0809, inset 0 0 0 .42em #e2b553, inset 0 0 0 .55em #0b0809, inset 0 0 0 .6em #8a6420, 0 .4em 1.2em rgba(0,0,0,.6); }
.cb-pat { position: absolute; inset: .7em; border-radius: .3em; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20'%3E%3Cg fill='none' stroke='%23e2b553' stroke-opacity='.35' stroke-width='1.1'%3E%3Ccircle cx='0' cy='20' r='9.9'/%3E%3Ccircle cx='0' cy='20' r='7.1'/%3E%3Ccircle cx='0' cy='20' r='4.4'/%3E%3Ccircle cx='40' cy='20' r='9.9'/%3E%3Ccircle cx='40' cy='20' r='7.1'/%3E%3Ccircle cx='40' cy='20' r='4.4'/%3E%3Ccircle cx='20' cy='10' r='9.9'/%3E%3Ccircle cx='20' cy='10' r='7.1'/%3E%3Ccircle cx='20' cy='10' r='4.4'/%3E%3C/g%3E%3C/svg%3E"); background-size: 2em auto; }
.cb-ring { position: absolute; left: 50%; top: 43%; width: 9em; height: 9em; margin: -4.5em 0 0 -4.5em; border-radius: 50%; background: radial-gradient(circle, #1b110b 58%, transparent 59%), var(--gold); box-shadow: 0 0 1.4em rgba(226,181,83,.35); display: grid; place-items: center; }
.cb-tai { width: 6.6em; height: 4.4em; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; background: var(--gold); }
.cb-word { position: absolute; left: 0; right: 0; bottom: 3.1em; text-align: center; font-family: var(--f-geki); font-size: 1.6em; letter-spacing: .3em; text-indent: .3em; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cback.glow-r { box-shadow: inset 0 0 0 .32em #0b0809, inset 0 0 0 .42em #6f9be8, inset 0 0 0 .55em #0b0809, 0 0 1.2em #3d7bd9, 0 0 3em rgba(61,123,217,.55); }
.cback.glow-sr { box-shadow: inset 0 0 0 .32em #0b0809, inset 0 0 0 .42em #e9eef5, inset 0 0 0 .55em #0b0809, 0 0 1.4em #dfe7f2, 0 0 3.4em rgba(220,230,245,.6); }
.cback.glow-ssr { box-shadow: inset 0 0 0 .32em #0b0809, inset 0 0 0 .42em #ffe08a, inset 0 0 0 .55em #0b0809, 0 0 1.6em #ffcf4a, 0 0 4em rgba(255,200,70,.75); }
.cback.glow-ur { box-shadow: inset 0 0 0 .32em #0b0809, inset 0 0 0 .42em #ff7a5a, inset 0 0 0 .55em #0b0809, 0 0 1.8em #ff5a3a, 0 0 4.5em rgba(255,80,40,.8); }
.cback.glow-ebs { box-shadow: inset 0 0 0 .32em #0b0809, inset 0 0 0 .42em #fff, inset 0 0 0 .55em #0b0809, 0 0 2em #fff, 0 0 5em rgba(200,160,255,.9); }
.cback::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; }
.cback.glow-ssr::after, .cback.glow-ur::after, .cback.glow-ebs::after { background: radial-gradient(ellipse at 50% 43%, rgba(255,230,160,.35), transparent 60%); animation: pulse2 1s ease-in-out infinite; }
.cback.glow-ebs::after { background: conic-gradient(from 0deg at 50% 43%, rgba(255,90,90,.3), rgba(255,220,90,.3), rgba(110,255,160,.3), rgba(90,200,255,.3), rgba(170,120,255,.3), rgba(255,90,200,.3), rgba(255,90,90,.3)); animation-duration: .7s; }
@keyframes pulse2 { 50% { opacity: 1; } }
@keyframes pulse { 50% { filter: brightness(1.35); } }
@keyframes huebox { to { filter: hue-rotate(360deg); } }

/* ── 演出の舞台 */
#stage { position: fixed; inset: 0; z-index: 50; background: #000; overflow: hidden; touch-action: manipulation; user-select: none; }
#stage .layer { position: absolute; inset: 0; }
#st-bg { z-index: 0; background: linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)), url(../img/bg_sando.webp) center 40% / cover no-repeat; }
#st-scene { z-index: 1; }
.sc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; background: #000; }
.sc-img { position: absolute; inset: -4%; background-position: center; background-size: cover; background-repeat: no-repeat; opacity: 0; }
.layer3d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
#st-3d-back { z-index: 2; }
#st-3d-front { z-index: 7; }
#st-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
#st-shake { position: absolute; inset: 0; }
.lanterns { position: absolute; left: 0; right: 0; top: 9%; z-index: 4; display: flex; justify-content: center; gap: clamp(6px, 3vw, 34px); pointer-events: none; }
.lantern { position: relative; width: clamp(46px, 9vw, 96px); color: #3a2d26; transform-origin: 50% 0; animation: sway 3.2s ease-in-out infinite; }
.lantern::before { content: ''; position: absolute; left: -60%; right: -60%; top: -25%; bottom: -25%; border-radius: 50%; background: radial-gradient(closest-side, var(--lc, transparent), transparent); opacity: 0; transition: opacity .25s; }
.lantern.lit::before { opacity: .85; }
.lantern svg { position: relative; }
.lantern:nth-child(2n) { animation-duration: 3.7s; animation-delay: -.8s; }
.lantern svg { width: 100%; height: auto; overflow: visible; }

.lantern.rainbow .lbody { animation: lhue 1.4s linear infinite; }
@keyframes lhue { to { filter: hue-rotate(360deg); } }
@keyframes sway { 50% { transform: rotate(2.4deg); } }
.cutin { position: absolute; left: -10%; right: -10%; top: 50%; height: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; }
.cutin .band { position: absolute; left: 0; right: 0; height: clamp(110px, 22vh, 220px); top: 50%; transform: translateY(-50%) skewY(-6deg); background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 26px), var(--band, linear-gradient(90deg, #0b0809, #3a0d0a 30%, #3a0d0a 70%, #0b0809)); box-shadow: 0 0 0 3px var(--edge, #e2b553), 0 0 60px rgba(0,0,0,.8); }
.cutin .word { position: relative; font-family: var(--f-geki); font-size: clamp(54px, 13vw, 168px); line-height: 1; letter-spacing: .04em; transform: skewY(-6deg); background: var(--wfill, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px rgba(0,0,0,.6); filter: drop-shadow(0 6px 0 rgba(0,0,0,.6)) drop-shadow(0 0 22px var(--wglow, rgba(255,200,80,.8))); white-space: nowrap; }
.cutin.has3d .word { opacity: 0 !important; }
.cutin .word.rain { animation: wordhue 1s linear infinite; }
@keyframes wordhue { to { filter: drop-shadow(0 6px 0 rgba(0,0,0,.6)) drop-shadow(0 0 22px rgba(255,200,80,.8)) hue-rotate(360deg); } }
.meter { position: absolute; left: 50%; bottom: max(18px, 3vh); z-index: 8; transform: translateX(-50%); width: min(560px, 92vw); padding: 10px 14px 12px; background: rgba(11,8,9,.78); border: 1px solid rgba(226,181,83,.5); border-radius: 8px; pointer-events: none; transition: border-color .3s, box-shadow .3s; }
.meter .row { display: flex; align-items: baseline; gap: 10px; }
.meter .lab { font-size: 13px; font-weight: 800; letter-spacing: .3em; color: var(--kin); }
.meter .pct { margin-left: auto; font-family: var(--f-geki); font-size: 30px; line-height: 1; color: #fff; letter-spacing: .02em; }
.meter .pct small { font-size: 14px; margin-left: 2px; }
.meter .word { font-family: var(--f-geki); font-size: 18px; color: var(--mc, #fff); min-width: 5em; }
.meter .segs { display: flex; gap: 4px; margin-top: 8px; }
.meter .segs i { flex: 1; height: 9px; border-radius: 2px; background: rgba(255,255,255,.1); transition: background .35s, box-shadow .35s; }
.meter .segs i.on { background: var(--mc, #fff); box-shadow: 0 0 10px var(--mc, #fff); }
.meter .sub { font-size: 11px; color: #b9a98c; margin-top: 6px; letter-spacing: .06em; display: flex; justify-content: space-between; }
.meter.hot { border-color: var(--mc); box-shadow: 0 0 26px var(--mc); }
.meter.surge { animation: metersurge .42s ease-out; }
@keyframes metersurge { 0% { transform: translateX(-50%) scale(1.09); box-shadow: 0 0 46px var(--mc), inset 0 0 24px var(--mc); } 100% { transform: translateX(-50%) scale(1); } }
.meter.bump .pct { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.meter.rain { --mc: #fff; }
.meter.rain .segs i.on { background: var(--rainbow); }
/* 一発告知・先バレ枠フラッシュ */
.st-kokuchi { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; box-shadow: inset 0 0 90px 18px var(--kc, #ff3a28), inset 0 0 180px 30px rgba(255,215,90,.55); }
/* 体感型・大太鼓連打／一撃ボタン */
.mash-wrap { position: absolute; left: 50%; bottom: max(126px, 16vh); z-index: 9; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: auto; }
.mash-btn { position: relative; width: clamp(118px, 24vw, 152px); height: clamp(118px, 24vw, 152px); border-radius: 50%; border: 4px solid #fff2c2; background: radial-gradient(circle at 35% 30%, #fff3c0, #e2a430 42%, #9a2016 78%, #3a0806 100%); box-shadow: 0 0 0 4px #240907, 0 0 38px rgba(255,190,60,.95), inset 0 4px 12px rgba(255,255,255,.55); color: #fff8e2; font-family: var(--f-geki); font-size: clamp(22px, 4.5vw, 30px); letter-spacing: .06em; text-shadow: 0 3px 0 #4a0a06, 0 0 14px rgba(255,210,80,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; transition: transform .06s ease-out, filter .06s; animation: mashpulse .48s ease-in-out infinite alternate; }
.mash-btn small { font-family: var(--f-mincho); font-size: 11px; letter-spacing: .22em; color: #fff0c0; margin-top: 3px; }
.mash-btn:active, .mash-btn.hit { transform: scale(.88); filter: brightness(1.45); }
.mash-btn.rain { background: conic-gradient(#ff5a5a, #ffd84d, #6dff9c, #5ad7ff, #a07dff, #ff6ad5, #ff5a5a); box-shadow: 0 0 0 4px #160a24, 0 0 54px rgba(220,180,255,1); }
@keyframes mashpulse { 0% { transform: scale(1); } 100% { transform: scale(1.07); } }
.mash-bar { width: min(290px, 76vw); height: 12px; border-radius: 999px; background: rgba(11,8,9,.82); border: 1.5px solid rgba(255,220,130,.75); overflow: hidden; box-shadow: 0 0 18px rgba(0,0,0,.7); }
.mash-bar b { display: block; height: 100%; width: 0%; background: var(--mc, var(--gold)); box-shadow: 0 0 14px var(--mc, #ffd04a); transition: width .08s ease-out; }
.mash-wrap.rain .mash-bar b { background: var(--rainbow); }
.st-caption { position: absolute; left: 0; right: 0; top: 24%; z-index: 8; text-align: center; font-weight: 800; font-size: clamp(22px, 4vw, 40px); letter-spacing: .3em; text-indent: .3em; color: #fff2d0; text-shadow: 0 0 18px rgba(255,180,60,.9), 0 2px 0 #000; pointer-events: none; opacity: 0; }
.st-vsub { position: absolute; right: max(4vw, 16px); top: 50%; z-index: 8; transform: translateY(-50%); writing-mode: vertical-rl; font-family: var(--f-fude); font-size: clamp(24px, 4.4vw, 52px); letter-spacing: .24em; color: #fff4da; text-shadow: 0 0 22px rgba(226,181,83,.85), 0 2px 6px rgba(0,0,0,.95); pointer-events: none; opacity: 0; white-space: nowrap; }
.st-vsub.left { right: auto; left: max(4vw, 16px); }
.flash { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; background: #fff; }
.stamp { position: absolute; z-index: 8; left: 50%; top: 50%; pointer-events: none; font-weight: 800; font-size: clamp(40px, 9vw, 110px); color: #fff4e0; background: #c8312b; padding: .1em .25em; border-radius: .08em; box-shadow: inset 0 0 0 .06em #fff4e0, inset 0 0 0 .1em #c8312b, 0 0 40px rgba(200,49,43,.8); white-space: nowrap; letter-spacing: .08em; opacity: 0; }
.stamp.ebs { background: url(../img/tex_raden.webp) center / 140% auto; color: #fff; text-shadow: 0 0 10px #000, 0 2px 0 #000; box-shadow: inset 0 0 0 .06em #fff, 0 0 60px rgba(220,180,255,.9); }
.stamp.gold { background: var(--gold); color: #3a2208; box-shadow: inset 0 0 0 .06em #3a2208, 0 0 50px rgba(255,200,80,.9); }
.reveal { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; perspective: 1200px; }
.bigbg { position: absolute; inset: 0; z-index: 4; background: rgba(0,0,0,.86); pointer-events: none; }
.bigscene { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.bigwrap { position: absolute; inset: 0; }
.bigwrap .reveal { z-index: 6; }
#stage.in-big #st-3d-back { z-index: 5; }
#stage.in-big #st-fx { z-index: 5; }
.flip { position: relative; transform-style: preserve-3d; }
.flip .face, .flip .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .back { transform: rotateY(180deg); }
.flip .back .card, .flip .face .card { position: absolute; inset: 0; width: 100%; }
.tapnote { position: absolute; left: 0; right: 0; bottom: 18%; z-index: 8; text-align: center; font-size: 15px; letter-spacing: .4em; color: #e9dcc0; animation: blink 1.3s ease-in-out infinite; pointer-events: none; }
@keyframes blink { 50% { opacity: .25; } }
.banner { position: absolute; left: 50%; bottom: max(14px, 3vh); z-index: 9; transform: translateX(-50%); width: min(640px, 94vw); padding: 12px 18px 14px; background: linear-gradient(180deg, rgba(23,17,15,.94), rgba(11,8,9,.96)); border: 1px solid var(--bc, #e2b553); border-radius: 8px; box-shadow: 0 0 30px var(--bg, rgba(226,181,83,.35)); opacity: 0; }
.banner .rr { display: flex; align-items: center; gap: 10px; }
.banner .rlab { font-family: var(--f-geki); font-size: 22px; padding: 2px 10px; border-radius: 3px; background: var(--bc, #e2b553); color: #120b08; }
.banner .rlab.rain { background: var(--rainbow); }
.banner .rname { font-size: 12px; letter-spacing: .2em; color: #cdbd9f; }
.banner .new { margin-left: auto; font-family: var(--f-geki); color: #ff5a3a; font-size: 20px; letter-spacing: .1em; text-shadow: 0 0 10px rgba(255,90,58,.8); }
.banner .dup { margin-left: auto; font-size: 13px; color: #e9dcc0; }
.banner .nm { font-weight: 800; font-size: clamp(22px, 4.5vw, 34px); margin-top: 6px; line-height: 1.2; }
.banner .rl { font-size: 13px; color: #d9cbb0; margin-top: 4px; }
.st-skip { position: absolute; top: 12px; right: 12px; z-index: 10; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.5); border-radius: 999px; padding: 6px 16px; font-size: 13px; letter-spacing: .2em; }
.grid10 { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; grid-template-columns: repeat(5, auto); gap: clamp(8px, 1.6vw, 22px); padding: 70px 12px 150px; }
.grid10 .slot { position: relative; perspective: 900px; cursor: pointer; }
.grid10 .slot { --cw: min(15vw, 190px, 25vh); }
.grid10 .slot .flip { width: var(--cw); aspect-ratio: 63 / 88; }
.grid10 .slot .newtag { position: absolute; top: -10px; left: -6px; z-index: 3; font-family: var(--f-geki); font-size: 13px; color: #fff; background: #d6332a; padding: 1px 6px; border-radius: 3px; transform: rotate(-8deg); box-shadow: 0 2px 6px rgba(0,0,0,.6); }
@media (max-width: 640px) and (orientation: portrait) {
  .grid10 { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; padding-bottom: 120px; }
  .grid10 .slot { --cw: 25vw; }
}
.endbar { position: absolute; left: 0; right: 0; bottom: max(14px, 2.5vh); display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; z-index: 10; }
.endbar button { min-width: 140px; padding: 11px 18px; border-radius: 6px; font-weight: 800; font-size: 16px; letter-spacing: .12em; border: 1px solid #e2b553; background: rgba(23,17,15,.92); }
.endbar button.main { background: linear-gradient(180deg, #d63a2f, #8e1a14); border-color: #ffd98a; }

/* ── 図鑑・交換所・設定（板） */
.panel { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: rgba(11,8,9,.985); }
.panel header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(226,181,83,.3); background: linear-gradient(180deg, #1d1410, #120c0a); flex-wrap: wrap; }
.panel header h2 { margin: 0; font-size: 22px; letter-spacing: .2em; }
.panel header .stat { font-size: 13px; color: #cdbd9f; }
.panel header .sp { flex: 1; }
.tabs { display: flex; gap: 6px; padding: 10px 16px 0; overflow-x: auto; flex: none; scrollbar-width: thin; }
.tabs button { flex: none; border: 1px solid rgba(226,181,83,.35); background: rgba(255,255,255,.03); border-radius: 6px 6px 0 0; padding: 7px 12px; font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.tabs button small { display: block; font-size: 10px; font-weight: 500; color: #b9a98c; }
.tabs button.on { background: linear-gradient(180deg, #8e1a14, #4a0d0a); border-color: #e2b553; }
.filters { display: flex; gap: 6px; padding: 8px 16px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid rgba(226,181,83,.18); font-size: 13px; }
.filters button { border: 1px solid rgba(255,255,255,.2); background: transparent; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 800; }
.filters button.on { border-color: var(--kin); background: rgba(226,181,83,.18); color: var(--kin-l); }
.gridwrap { flex: 1; overflow-y: auto; padding: 14px 16px 40px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 12px; }
.cgrid .cell { position: relative; content-visibility: auto; contain-intrinsic-size: 118px 190px; cursor: pointer; container-type: inline-size; }
.cgrid .cell .card { width: 100%; font-size: calc(100cqw / 18); perspective: 600px; }
.cgrid .cell .cnt { position: absolute; right: -4px; top: -6px; z-index: 2; font-size: 11px; font-weight: 800; background: #1d1410; border: 1px solid #e2b553; border-radius: 999px; padding: 0 6px; }
.cgrid .cell .kiratag { position: absolute; left: -4px; top: -6px; z-index: 2; font-family: var(--f-fude); font-size: 13px; background: var(--rainbow); color: #1a0f22; border-radius: 3px; padding: 0 4px; }
.cgrid .empty { aspect-ratio: 63 / 88; border-radius: 8px; border: 1px dashed rgba(226,181,83,.3); background: repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 6px, transparent 6px 12px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #6d5d48; font-size: 12px; }
.cgrid .empty b { font-family: var(--f-geki); font-size: 26px; color: #4a3d2e; }
.cgrid .empty .rk { font-family: var(--f-geki); font-size: 11px; color: var(--rc, #6d5d48); }
.cgrid .cost { text-align: center; font-size: 12px; margin-top: 4px; color: #e9dcc0; }
.cgrid .cost button { margin-top: 3px; width: 100%; border: 1px solid #e2b553; background: rgba(142,26,20,.6); border-radius: 4px; padding: 4px 0; font-size: 12px; font-weight: 800; }
.cgrid .cost button:disabled { opacity: .35; cursor: not-allowed; }

/* 札の詳しい窓 */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.detail { display: flex; gap: 28px; align-items: center; max-width: 980px; width: 100%; flex-wrap: wrap; justify-content: center; }
.detail .card { --cw: min(360px, 82vw); }
.detail .info { flex: 1; min-width: 260px; max-width: 520px; }
.detail .info .rl { font-family: var(--f-geki); font-size: 15px; letter-spacing: .1em; }
.detail .info h3 { margin: 4px 0 6px; font-size: clamp(24px, 4vw, 36px); line-height: 1.25; }
.detail .info .meta { font-size: 14px; color: #d9cbb0; line-height: 1.7; }
.detail .info .txt { font-size: 15px; line-height: 1.85; margin: 12px 0; }
.detail .info ul { padding-left: 1.1em; margin: 8px 0; font-size: 14px; line-height: 1.7; max-height: 34vh; overflow-y: auto; }
.detail .info .kin { margin-top: 10px; font-size: 13px; color: #cdbd9f; }
.detail .info .kin a { color: var(--kin); cursor: pointer; margin-right: 10px; text-decoration: underline; text-underline-offset: 3px; }
.detail .info .own { margin-top: 12px; font-size: 13px; color: #b9a98c; }
.closex { position: fixed; top: 12px; right: 14px; z-index: 61; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.6); font-size: 20px; }
.sheet { width: min(640px, 100%); background: linear-gradient(180deg, #1d1410, #120c0a); border: 1px solid rgba(226,181,83,.45); border-radius: 10px; padding: 20px 22px; max-height: 92vh; overflow-y: auto; }
.sheet h3 { margin: 0 0 12px; font-size: 22px; letter-spacing: .15em; }
.sheet h4 { margin: 18px 0 8px; font-size: 15px; letter-spacing: .1em; color: var(--kin); }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet td, .sheet th { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.sheet th { color: #b9a98c; font-weight: 500; font-size: 12px; }
.sheet p, .sheet li { font-size: 14px; line-height: 1.8; color: #e9dcc0; }
.sheet .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet .btns button { border: 1px solid rgba(226,181,83,.5); background: rgba(255,255,255,.04); border-radius: 6px; padding: 8px 14px; font-weight: 800; font-size: 14px; }
.sheet .btns button.r-key { font-family: var(--f-geki); }
.toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 90; background: rgba(23,17,15,.96); border: 1px solid var(--kin); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 800; letter-spacing: .06em; box-shadow: 0 8px 30px rgba(0,0,0,.6); animation: toast 3.2s ease-out forwards; pointer-events: none; text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px); } 8%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

@media (max-width: 640px) {
  #top { padding: 8px 10px; gap: 6px; flex-wrap: wrap; }
  #top .sp { display: none; }
  .purse { margin-left: auto; }
  .navs { width: 100%; gap: 6px; }
  .navs .tbtn { flex: 1; }
  #home { padding-top: 96px; }
  #top .logo { font-size: 15px; }
  #top .logo small { display: none; }
  .coin { font-size: 13px; padding: 3px 9px 3px 5px; }
  .tbtn { padding: 6px 8px; font-size: 12px; }
  .pull { width: min(250px, 44vw); padding: 12px 8px 10px; }
  .pull .t { font-size: 22px; }
  .cgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 8px; }
  .purse .coin.pity { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lantern, .r-ebs .c-frame { animation: none; }
}
