* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body { background: #0b0b0e; color: #fff; font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; font-size: 15px; position: fixed; inset: 0; width: 100%; touch-action: manipulation; overscroll-behavior: none; }
#app { max-width: 560px; margin: 0 auto; padding: 0 10px 8px; height: 100dvh; height: 100svh; display: flex; flex-direction: column; }
#hdr { background: #141419; margin: 0 -10px; padding: 10px 14px 8px; display: flex; align-items: flex-start; gap: 10px; }
#hdrMain { flex: 1; min-width: 0; }
#menuBtn { background: #2c2c2e; color: #fff; border: 0; border-radius: 10px; width: 40px; height: 40px; font-size: 19px; cursor: pointer; flex: none; font-family: inherit; }
#backBar { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
#backBtn { background: #2c2c2e; color: #0a84ff; border: 0; border-radius: 10px; font-size: 13.5px; font-weight: 700; padding: 9px 14px; cursor: pointer; font-family: inherit; }
#backTitle { font-size: 15px; font-weight: 700; }
#title { font-size: 17px; font-weight: 700; }
#status { font-size: 12px; color: #d1d1d6; margin-top: 2px; min-height: 16px; word-break: break-all; }
#card { background: #17171c; border-radius: 16px; margin-top: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
#cardMain { flex: 1; min-width: 0; }
#cardName { background: none; border: 0; color: #fff; font-size: 16px; font-weight: 700; padding: 0; text-align: left; cursor: pointer; }
#cardSub { font-size: 11px; color: #98989f; margin-top: 2px; }
#moneyPill { background: #2c2c2e; color: #ffd60a; border: 0; border-radius: 18px; font-size: 14px; font-weight: 700; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
#actions { display: flex; gap: 8px; margin-top: 10px; }
.act { flex: 1; border: 0; border-radius: 16px; font-size: 14px; font-weight: 700; padding: 12px 2px; color: #fff; cursor: pointer; }
.act.blue { background: #0a84ff; }
.act.orange { background: #ff9f0a; }
.act.dark { background: #2c2c2e; }
.act:disabled { opacity: .45; }
.seg { display: flex; background: #1c1c22; border-radius: 10px; padding: 2px; margin-top: 10px; gap: 2px; }
.seg button { flex: 1; background: none; border: 0; color: #d1d1d6; font-size: 13px; padding: 7px 2px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: #3a3a42; color: #fff; font-weight: 700; }
.seg.small button { font-size: 12px; }
.toolbar { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.toolbar button { background: #2c2c2e; color: #fff; border: 0; border-radius: 10px; font-size: 12.5px; padding: 8px 10px; cursor: pointer; }
#searchWrap { margin-top: 10px; }
#searchBox { width: 100%; background: #1c1c22; border: 1px solid #33333c; border-radius: 10px; color: #fff; font-size: 16px; padding: 9px 12px; }
#list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.row { background: #17171c; border-radius: 12px; height: 54px; flex: none; padding: 0 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; border: 0; width: 100%; text-align: left; color: #fff; font-size: 15px; }
.row.static { cursor: default; }
.row img.ic { width: 40px; height: 40px; object-fit: contain; flex: none; }
.row img.ic.sm { width: 30px; height: 30px; }
.row .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .dt { font-size: 12.5px; color: #0a84ff; white-space: nowrap; }
.row .dt.gray { color: #98989f; } .row .dt.green { color: #30d158; } .row .dt.orange { color: #ff9f0a; }
.row.gray .tx { color: #98989f; }
.row .tx.green { color: #30d158; } .row .tx.orange { color: #ff9f0a; } .row .tx.blue { color: #0a84ff; }
.row b { font-weight: 700; }
.sect { font-size: 12px; color: #98989f; margin: 8px 2px 0; }
#foot { font-size: 11px; color: #63636b; text-align: center; margin-top: 8px; flex: none; }
[hidden] { display: none !important; }
#modalWrap { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 120; }
#modalCard { background: #1e1e24; border-radius: 16px; padding: 18px; width: 100%; max-width: 420px; max-height: 94dvh; overflow-y: auto; }
#modalTitle { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
#modalBody { font-size: 13.5px; color: #e5e5ea; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
#modalBody input[type=text], #modalBody input[type=number], #modalBody input[type=url] { width: 100%; background: #121216; border: 1px solid #3a3a42; border-radius: 8px; color: #fff; font-size: 16px; padding: 9px 10px; margin: 6px 0; }
#modalBody label { display: block; font-size: 12px; color: #98989f; margin-top: 8px; }
#modalBtns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
#modalBtns button { flex: 1; border: 0; border-radius: 10px; font-size: 14px; font-weight: 700; padding: 11px 6px; background: #0a84ff; color: #fff; cursor: pointer; white-space: nowrap; }
#modalBtns button.sub { background: #3a3a42; }
#modalBtns button.danger { background: #ff453a; }
.quick { display: flex; gap: 6px; margin-top: 6px; }
.quick button { flex: 1; background: #2c2c2e; border: 0; color: #fff; border-radius: 8px; padding: 7px 0; font-size: 13px; cursor: pointer; }
.ivgrid { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 8px; margin-top: 6px; }
.ivgrid input { width: 100%; }
input[type=range] { accent-color: #0a84ff; }
.detailHead { background: #17171c; border-radius: 16px; padding: 14px; display: flex; gap: 14px; align-items: center; }
.detailHead img { width: 96px; height: 96px; object-fit: contain; border-radius: 50%; border: 3px solid #3a3a42; background: #101014; }
.detailHead .nm { font-size: 19px; font-weight: 700; }
.detailHead .sb { font-size: 12px; color: #98989f; margin-top: 3px; line-height: 1.5; }
a { color: #0a84ff; }

.qmark { flex: none; width: 20px; height: 20px; margin-left: 6px; border: 1.5px solid #8e8e93; border-radius: 50%; color: #8e8e93; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.dname { text-align: center; font-size: 19px; font-weight: 700; margin-top: 4px; }
.dsub { text-align: center; font-size: 12px; color: #98989f; margin-top: 2px; }
.dcircle { position: relative; width: min(80vw, 46dvh, 350px); aspect-ratio: 1; margin: 4px auto 0; }
.dbg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74%; height: 74%; object-fit: contain; opacity: 0.12; pointer-events: none; }
.dcenter { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 106px; height: 106px; border-radius: 50%; border: 6px solid #8e8e93; background: #1c1c22; padding: 0; cursor: pointer; overflow: hidden; }
.dcenter img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; transform: scale(1.42); }
.sat { position: absolute; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 2px; font-family: inherit; }
.satn { font-size: 9.5px; color: #98989f; }
.satv { font-size: 11.5px; font-weight: 700; line-height: 1.15; text-align: center; }
.satv.sm { font-size: 10px; }
.satup { position: absolute; right: 1px; bottom: 1px; width: 17px; height: 17px; border-radius: 50%; background: #ff9f0a; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.satq { position: absolute; right: 1px; top: 1px; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #aeaeb2; color: #e5e5ea; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); }
.dgoku { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; }
.dgokuL { color: #ff9f0a; font-weight: 700; font-size: 13px; margin-right: 2px; }
.gchip { flex: 1; background: #2c2c2e; color: #f5f5f7; border: 0; border-radius: 18px; height: 36px; font-weight: 700; font-size: 12px; cursor: pointer; font-family: inherit; }
.dbback { display: block; margin: 12px auto 4px; width: 170px; height: 42px; border-radius: 21px; border: 0; background: #2c2c2e; color: #f5f5f7; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }

.book { perspective: 1200px; margin-top: 12px; }
.bspread { display: flex; flex-direction: row; align-items: stretch; }
.bspread.flip-next { transform-origin: center; animation: flipNext .38s ease; }
.bspread.flip-prev { transform-origin: center; animation: flipPrev .38s ease; }
@keyframes flipNext { from { transform: rotateY(-46deg); opacity: .2; } to { transform: rotateY(0deg); opacity: 1; } }
@keyframes flipPrev { from { transform: rotateY(46deg); opacity: .2; } to { transform: rotateY(0deg); opacity: 1; } }

.bgrid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, auto); align-content: center; row-gap: 12px; gap: 12px 2px; align-items: center; justify-items: center; }
.bpno { position: absolute; left: 9px; bottom: 3px; font-size: 10px; font-weight: 700; color: #6e6e78; }
.binding { width: 16px; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; }
.binding i { width: 15px; height: 10px; border-radius: 5px; background: linear-gradient(#55555e, #2c2c33, #55555e); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.bookinfo { margin-top: 10px; background: #ffd60a; color: #1c1c1e; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 13.5px; text-align: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.pgbtn { width: 46px; height: 34px; border-radius: 17px; border: 0; background: #2c2c2e; color: #fff; font-size: 13px; cursor: pointer; font-family: inherit; }
.pgbtn:disabled { opacity: .3; }
.pginfo { font-size: 12.5px; color: #98989f; min-width: 54px; text-align: center; }
.medal { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; padding: 0; position: relative; width: 100%; height: 100%; }
.medal::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top: 6px solid #c9c9d1; border-bottom: 0; }
.mring { position: relative; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(from 210deg, #f4f4f8, #8f8f99, #e8e8ee, #76767f, #f4f4f8); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.minner { width: 37px; height: 37px; border-radius: 50%; border: 2.5px solid #8e8e93; background: #23232b; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.minner img { width: 100%; height: 100%; object-fit: cover; }
.medal.off .minner img { filter: grayscale(1); opacity: 0.45; }
.medal.sel .mring { outline: 2.5px dashed #ffd60a; outline-offset: 2px; }
.mbadge { position: absolute; right: -4px; bottom: -4px; min-width: 17px; height: 17px; border-radius: 9px; background: #0a84ff; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.mbadge.ok { background: #30d158; }

#cardMeta { display: flex; gap: 8px; margin-top: 8px; }
#cardMeta button { flex: 1; background: #1c1c22; color: #e5e5ea; border: 1px solid #2c2c33; border-radius: 10px; padding: 7px 4px; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.tedit { display: flex; gap: 10px; flex-wrap: wrap; }
.tedit label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #98989f; flex: 1; min-width: 52px; }
.tedit input { background: #1c1c22; border: 1px solid #3a3a42; border-radius: 8px; color: #fff; padding: 8px; font-size: 16px; width: 100%; box-sizing: border-box; font-family: inherit; }

.rpage .bpno { left: auto; right: 9px; }

.mring2 { position: relative; width: 52px; height: 52px; display: block; border-radius: 50%; }
.mring2 img { width: 100%; height: 100%; display: block; }
.medal.off .mring2 img { filter: grayscale(1); opacity: 0.45; }
.medal.sel .mring2 { outline: 2.5px dashed #ffd60a; outline-offset: 2px; }

.medal2 { position: relative; width: 52px; height: 52px; display: block; border-radius: 50%; background: conic-gradient(from 210deg, #f4f4f8, #8f8f99, #e8e8ee, #76767f, #f4f4f8); box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.mseg { position: absolute; left: 3px; top: 3px; width: 46px; height: 46px; border-radius: 50%; }
.mart { position: absolute; left: 7px; top: 7px; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; }
.medal.off .mart { filter: grayscale(1); opacity: 0.45; }
.medal.sel .medal2 { outline: 2.5px dashed #ffd60a; outline-offset: 2px; }

.medal3 { position: relative; width: 94%; max-width: 78px; aspect-ratio: 1; display: block; border-radius: 50%; }
.mart3 { position: absolute; left: 50%; top: 50%; width: 92%; height: 92%; transform: translate(-50%, -50%) scale(1.42); border-radius: 50%; object-fit: cover; z-index: 2; }
.mring3 { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.medal.off .mart3 { filter: grayscale(1); opacity: 0.45; }
.medal.sel .medal3 { outline: 2.5px dashed #ffd60a; outline-offset: 2px; }

.bookovl { position: fixed; inset: 0; overflow: hidden; z-index: 80; background: #0e0e12; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px calc(env(safe-area-inset-bottom, 0px) + 10px); }
.bookovl .bspread { flex: 1; min-height: 0; }
.bhead { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; }
.btitle { flex: 1; font-weight: 700; font-size: 15px; color: #fff; }
.bclose { background: #2c2c33; color: #fff; border: none; border-radius: 50%; width: 34px; height: 34px; font-size: 15px; flex: none; }
.bbtn { background: #2c2c33; color: #7ee787; border: none; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 700; flex: none; }
.bsearch { margin: 0 0 8px; background: #1c1c22; border: 1px solid #33333c; border-radius: 10px; color: #fff; padding: 9px 12px; font-size: 16px; width: 100%; box-sizing: border-box; }
.bookovl .bookinfo { margin-top: 10px; }
.bookovl .pager { margin-top: 10px; }

.limrow { display: flex; align-items: center; justify-content: space-between; background: #1c1c22; border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-weight: 700; font-size: 14px; color: #fff; }
.limbtn { border: 0; border-radius: 16px; width: 64px; height: 32px; font-weight: 700; font-size: 13px; background: #3a3a3f; color: #98989f; cursor: pointer; font-family: inherit; flex: none; }
.limbtn.on { background: #ff453a; color: #fff; }
.limnote { color: #98989f; font-size: 11.5px; margin-top: 6px; text-align: center; }

.rows { display: flex; flex-direction: column; gap: 6px; flex: none; }
.lpg { margin-top: auto; flex: none; }
.yoktb { margin-top: 0; align-items: center; }
.yoktb button { flex: 1; white-space: nowrap; font-size: 11.5px; padding: 8px 2px; }
.yoktb button.bk { flex: none; padding: 8px 16px; font-size: 12.5px; }
.tbtitle { flex: 1; font-size: 12.5px; color: #98989f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpsearch { flex: 1; min-width: 0; background: #1c1c22; border: 1px solid #33333c; border-radius: 10px; color: #fff; padding: 8px 10px; font-size: 16px; font-family: inherit; }

.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 10px 4px 4px; }
.mtile { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; padding: 0; min-width: 0; }
.mtimg { position: relative; display: block; width: 100%; min-width: 0; }
.mtimg img { width: 100%; aspect-ratio: 1; display: block; border-radius: 22px; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.mdot { position: absolute; right: -5px; top: -5px; width: 21px; height: 21px; border-radius: 50%; background: #ff453a; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); z-index: 3; }
.mtlb { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 13.5px; font-weight: 800; color: #ffdf3d; font-family: "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", "Hiragino Sans", sans-serif; letter-spacing: .02em; text-shadow: -1.5px 0 0 #402a12, 1.5px 0 0 #402a12, 0 -1.5px 0 #402a12, 0 1.5px 0 #402a12, -1.5px -1.5px 0 #402a12, 1.5px -1.5px 0 #402a12, -1.5px 1.5px 0 #402a12, 1.5px 1.5px 0 #402a12, 0 3px 4px rgba(0,0,0,.4); pointer-events: none; }
.mtimg.puni { background: radial-gradient(circle at 50% 32%, #cdefff, #57b6f2); border-radius: 22px; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.mtimg.puni { overflow: hidden; }
.mtimg.puni img { box-shadow: none; object-fit: contain; padding: 0; box-sizing: border-box; transform: scale(1.42) translateY(-3%); }
.menulist { margin: -4px 0; }
.mrow { display: flex; align-items: center; justify-content: space-between; padding: 13px 4px; border-bottom: 1px solid #33333c; cursor: pointer; }
.mrow:last-child { border-bottom: 0; }
.mlb { font-size: 15px; font-weight: 700; color: #fff; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.mlb small { font-size: 11px; color: #98989f; font-weight: 400; }
.mchev { color: #63636b; font-size: 22px; font-weight: 700; }

#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); transform: translateX(-50%) translateY(10px); background: rgba(30,30,36,.93); color: #fff; font-size: 13.5px; font-weight: 700; padding: 11px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.55); opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 200; pointer-events: none; max-width: 86vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pstage { position: relative; width: min(96vw, 430px); aspect-ratio: 1.02; margin: 8px auto 4px; border-radius: 26px; background: radial-gradient(circle at 18% 12%, rgba(255,255,255,.5), rgba(255,255,255,0) 42%), radial-gradient(rgba(255,255,255,.28) 2.2px, transparent 2.6px) 0 0/26px 26px, linear-gradient(180deg, #a8e2ff 0%, #5db6f5 55%, #2f8fe8 100%); border: 3px solid #e6f7ff; box-shadow: 0 6px 18px rgba(0,40,90,.45), inset 0 2px 0 rgba(255,255,255,.7); overflow: hidden; }
.ptitle { position: absolute; top: 5px; left: 0; right: 0; text-align: center; font-size: 21px; font-weight: 800; color: #ffdf3d; font-family: "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", "Hiragino Sans", sans-serif; text-shadow: -2px 0 0 #402a12, 2px 0 0 #402a12, 0 -2px 0 #402a12, 0 2px 0 #402a12, -2px -2px 0 #402a12, 2px -2px 0 #402a12, -2px 2px 0 #402a12, 2px 2px 0 #402a12, 0 4px 5px rgba(0,0,0,.35); }
.pcenter { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); width: 27%; aspect-ratio: 1.25; background: radial-gradient(ellipse at 50% 38%, #3d4b66, #141c2e 75%); border: 3px solid #d8b34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(0,40,90,.5); }
.pcenter img { width: 74%; aspect-ratio: 1; object-fit: cover; object-position: 62% 38%; border-radius: 50%; display: block; }
.pslot { position: absolute; width: 32%; overflow: hidden; display: flex; align-items: center; gap: 4px; background: linear-gradient(180deg, #fffbe8, #ffe873); border: 2px solid #e8a91c; border-radius: 999px; padding: 4px 6px 4px 4px; box-shadow: 0 2px 6px rgba(0,60,120,.4); text-align: left; font-family: inherit; cursor: pointer; }
.pslot.empty { justify-content: center; color: #8a6d1f; font-size: 12px; font-weight: 700; background: linear-gradient(180deg, #f4f4f4, #d9d9d9); border-color: #a8a8a8; color: #777; min-height: 48px; }
.psicon { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; border: 2.5px solid #8e8e93; background: #fff; overflow: hidden; display: block; }
.psicon img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.55); }
.psinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.psname { font-size: 10px; letter-spacing: 0; font-weight: 800; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psrow { display: flex; align-items: center; gap: 4px; }
.pslv { background: #2f9df4; color: #fff; font-size: 9px; font-weight: 800; border-radius: 999px; padding: 1px 5px; }
.pshp { font-size: 9.5px; font-weight: 800; color: #333; white-space: nowrap; }
.psrow { flex-wrap: nowrap; }
.phint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,60,120,.5); }

#ver { font-size: 11px; color: #98989f; font-weight: 700; margin-left: 6px; }
.verline { text-align: center; color: #63636b; font-size: 11px; padding-top: 10px; }




.bpage { display: flex; flex-direction: column; flex: 1; min-width: 0; background: linear-gradient(#26262e, #1d1d24); border-radius: 10px; padding: 12px 6px 14px; position: relative; box-shadow: inset 0 0 0 1px #3a3a44, 0 2px 6px rgba(0,0,0,.4); }
.mtempty { aspect-ratio: 1; border: 2px dashed rgba(90,110,140,.30); border-radius: 16px; }

.mgrid.flip-next { animation: hflipN .38s ease; }
.mgrid.flip-prev { animation: hflipP .38s ease; }
@keyframes hflipN { from { transform: perspective(900px) rotateY(-11deg) translateX(16px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes hflipP { from { transform: perspective(900px) rotateY(11deg) translateX(-16px); opacity: .3; } to { transform: none; opacity: 1; } }
.hpager { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 0 2px; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.hpager button { background: #2c2c30; color: #fff; border: 0; width: 38px; height: 32px; border-radius: 10px; font-size: 14px; cursor: pointer; }

#list.home { display: flex; flex-direction: column; overflow: hidden; }
#list.home { overflow: hidden; }
#list.home .mgrid { flex: 1 1 auto; min-height: 0; grid-template-rows: repeat(3, minmax(0, 1fr)); }
#list.home .mtile { height: 100%; min-height: 0; }
#list.home .mtimg { height: 100%; }
#list.home .mtimg img { height: 100%; aspect-ratio: auto; object-fit: cover; }
#list.home .mtimg.medalt img { object-position: 50% 10%; }
#list.home .mtempty { aspect-ratio: auto; height: 100%; }

/* ===== game theme (v41) ===== */
body { background: repeating-linear-gradient(180deg, rgba(255,255,255,.10) 0 7px, rgba(255,255,255,0) 7px 14px), radial-gradient(rgba(255,255,255,.20) 3px, transparent 3.8px) 8px 8px/48px 48px, radial-gradient(rgba(255,255,255,.14) 3px, transparent 3.8px) 32px 32px/48px 48px, linear-gradient(180deg, #8fd2f8 0%, #63b6f0 55%, #4aa7e8 100%); background-attachment: fixed; color: #14324f; }
#hdr { background: transparent; }
#title { color: #14324f; }
#ver { color: #2c5a86; }
#status { color: #1d4e79; }
#menuBtn { background: rgba(255,255,255,.88); color: #14324f; box-shadow: 0 2px 5px rgba(20,70,120,.25); }
#card { background: rgba(255,255,255,.87); border: 2px solid rgba(255,255,255,.95); box-shadow: 0 3px 8px rgba(20,70,120,.22); }
#cardName { color: #14324f; }
#cardSub { color: #3c6a99; }
#cardSub { white-space: nowrap; overflow: hidden; }
#cardSub .hearts { font-size: 16px; letter-spacing: 1px; vertical-align: -2px; color: #ff3355; }
.lvname { font-weight: bold; }
.lvname.lv1 { color: #8496a5; }
.lvname.lv2 { color: #1f7ad1; }
.lvname.lv3 { color: #e79b00; }
.lvname.lv4 { color: #1a1a1e; }
#cardNext { color: #5b6b7a; font-size: 11px; margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 1px 6px; }
#cardNext .cd { color: #e0342b; font-weight: bold; white-space: nowrap; }
.mcard { border-radius: 16px; padding: 14px 16px; color: #fff; box-shadow: 0 4px 14px rgba(20,50,90,.35); margin-top: 4px; }
.mcard.lv1 { background: linear-gradient(135deg, #93a3b1, #66798a); }
.mcard.lv2 { background: linear-gradient(135deg, #2f83d8, #12579f); }
.mcard.lv3 { background: linear-gradient(135deg, #f6c445, #dd9206); color: #503a00; }
.mcard.lv4 { background: linear-gradient(135deg, #43434c, #0e0e11); }
.mchead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 2px; font-weight: 700; }
.mcrank { font-size: 17px; letter-spacing: 0; }
.mcbody { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.mcface { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid rgba(255,255,255,.85); flex: none; }
.mcname { font-size: 19px; font-weight: 800; }
.mcsub { font-size: 12px; opacity: .9; margin-top: 2px; }
.mchearts { font-size: 15px; margin-top: 4px; }
.mcnext { font-size: 11px; font-weight: 700; color: #ffd9d4; margin-top: 2px; }
.mcard.lv3 .mcnext { color: #a33c00; }
.mcfoot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; letter-spacing: 1px; opacity: .9; font-family: monospace; }
#cardSub .hnext { color: #e0342b; font-weight: bold; }
#moneyPill { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 2px 4px rgba(20,70,120,.25); }
#cardMeta button { background: rgba(255,255,255,.88); color: #1d4e79; border: 2px solid rgba(255,255,255,.95); box-shadow: 0 2px 4px rgba(20,70,120,.18); }
.seg { background: rgba(255,255,255,.5); box-shadow: inset 0 1px 3px rgba(20,70,120,.18); }
.seg button { color: #2c5a86; }
.seg button.on { background: #fff; color: #14324f; box-shadow: 0 2px 4px rgba(20,70,120,.25); }
#backBtn { background: rgba(255,255,255,.92); color: #1463b4; box-shadow: 0 2px 4px rgba(20,70,120,.2); }
#backTitle { color: #14324f; }
#list { scrollbar-color: #ffd83d #14507e; }
#list::-webkit-scrollbar { width: 6px; }
#list::-webkit-scrollbar-track { background: #14507e; border-radius: 3px; }
#list::-webkit-scrollbar-thumb { background: #ffd83d; border-radius: 3px; }
.row { background: linear-gradient(180deg, #eaf7ff, #bfe4fb 55%, #a3d4f9); border: 2px solid #57a0d8; border-radius: 14px; color: #14324f; box-shadow: inset 0 2px 0 rgba(255,255,255,.9), 0 2px 3px rgba(20,70,120,.22); }
.row .dt { color: #1463b4; }
.row .dt.gray { color: #5a7a99; }
.row .dt.green { color: #1d9e4b; }
.row .dt.orange { color: #e07b00; }
.row .tx.green { color: #1d9e4b; }
.row .tx.orange { color: #e07b00; }
.row .tx.blue { color: #1463b4; }
.row.gray .tx { color: #5a7a99; }
.row img.ic { border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(20,70,120,.35); }
.icw { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(20,70,120,.35); display: block; }
.icw img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.42); display: block; }
.sect { color: #14507e; font-weight: 700; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.toolbar button { background: rgba(255,255,255,.92); color: #1d4e79; box-shadow: 0 2px 4px rgba(20,70,120,.2); font-weight: 700; }
.act.blue { background: linear-gradient(180deg, #6ec3f7, #2f9df4); }
.act.orange { background: linear-gradient(180deg, #fff3a0, #ffc61a); color: #5a3a00; }
.act.dark { background: rgba(255,255,255,.92); color: #1d4e79; }
#foot { color: #1d4e79; }
.limrow { background: rgba(255,255,255,.87); color: #14324f; box-shadow: 0 2px 5px rgba(20,70,120,.2); }
.hpager { color: #14324f; }
.hpager button { background: rgba(255,255,255,.92); color: #14324f; box-shadow: 0 2px 4px rgba(20,70,120,.2); }
#modalCard { background: #fff; color: #14324f; }
#modalTitle { color: #14324f; }
input[type="text"], input[type="number"], input[type="password"], input[type="url"], input[type="datetime-local"], select, textarea { background: #fff; color: #14324f; border-color: #9fc6e8; }

.limnote { color: #2c5a86; font-size: 12.5px; font-weight: 600; }
.dsub { color: #2c5a86; }
.pginfo { color: #1d4e79; }
.tbtitle { color: #1d4e79; }
#modalBody label { color: #5a7a99; }
.tedit label { color: #5a7a99; }
.mlb small { color: #5a7a99; }
.mchev { color: #9fc6e8; }
.verline { color: #5a7a99; }

.pslot { position: absolute; width: 31%; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; cursor: pointer; font-family: inherit; overflow: visible; }
.pslot.empty { cursor: default; }
.psname2 { background: rgba(255,255,255,.94); color: #14324f; font-size: 11.5px; font-weight: 800; padding: 2px 10px; border-radius: 999px; box-shadow: 0 1px 3px rgba(20,70,120,.35); white-space: nowrap; max-width: 106%; overflow: hidden; text-overflow: ellipsis; }
.psname2.off { color: #8a97a5; }
.psicon { box-shadow: 0 3px 7px rgba(20,70,120,.35); }
.psicon.emptyface { background: rgba(255,255,255,.35); border: 3px dashed rgba(255,255,255,.7); }
.psplate { display: flex; align-items: center; gap: 5px; background: linear-gradient(180deg, #fffbe8, #ffe873); border: 2px solid #e8a91c; border-radius: 999px; padding: 2px 9px 2px 3px; margin-top: -13px; box-shadow: 0 2px 5px rgba(20,70,120,.3); position: relative; z-index: 2; }
.pslv { font-size: 10px; padding: 1px 6px; }
.pshp { font-size: 11px; }

/* ===== readability & buttons (v44) ===== */
.mlb { color: #14324f; }
.mrow { border-bottom: 1px solid #d7e7f3; }
.mrow:active { background: #eaf5fd; }
.mchev { color: #57a0d8; }
#modalBtns button { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 2px 4px rgba(20,70,120,.25); border-radius: 12px; }
#modalBtns button.sub { background: #fff; color: #1463b4; border: 2px solid #57a0d8; box-shadow: none; }
#modalBtns button.danger { background: linear-gradient(180deg, #ff8a80, #f44336); color: #fff; box-shadow: 0 2px 4px rgba(120,20,20,.3); }
#modalBtns button:active { transform: scale(.98); }
.quick button { background: linear-gradient(180deg, #eaf7ff, #bfe4fb); color: #1463b4; border: 2px solid #57a0d8; font-weight: 700; }
.gchip { background: rgba(255,255,255,.92); color: #1463b4; border: 2px solid #57a0d8; box-shadow: 0 2px 4px rgba(20,70,120,.2); }
.gchip:active { transform: scale(.97); }
.satn { color: #d8d8e2; }
.limbtn { background: #fff; color: #1463b4; border: 2px solid #57a0d8; }
.limbtn.on { background: linear-gradient(180deg, #ff8a80, #f44336); color: #fff; border: 2px solid #d32f2f; }
.row:active { filter: brightness(1.06); transform: scale(.995); }
.toolbar button:active, #backBtn:active, .hpager button:active { transform: scale(.97); }
#modalBody { color: #14324f; }

.bookovl .bspread { flex: none; margin: auto 0; height: min(calc(62.8vw + 22px), 374px); }

/* ===== v49: quest badges/tabs, drums, progress ===== */
.qseg { margin-bottom: 8px; }
.qbadge { margin-left: auto; flex: none; font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.qbadge.done { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #7a4d00; box-shadow: inset 0 0 0 2px #e0a800, 0 1px 2px rgba(20,70,120,.25); }
.qbadge.prog { background: #57a0d8; color: #fff; }
.qbadge.yet { background: #eef4fa; color: #5a7a99; box-shadow: inset 0 0 0 2px #bcd8f2; }
.qbadge.lock { background: #dfe7ee; color: #8aa0b4; }
.drums { display: flex; gap: 14px; justify-content: center; padding: 2px 0; }
.drumcol { text-align: center; }
.drumwrap { position: relative; width: 96px; height: 102px; }
.drum { height: 102px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.drum::-webkit-scrollbar { display: none; }
.dsp { height: 34px; }
.ditem { height: 34px; line-height: 34px; font-size: 17px; font-weight: 700; color: #14324f; scroll-snap-align: center; text-align: center; }
.drumband { position: absolute; left: 2px; right: 2px; top: 34px; height: 34px; border-top: 2px solid #57a0d8; border-bottom: 2px solid #57a0d8; background: rgba(87,160,216,.10); border-radius: 6px; pointer-events: none; }
.dunit { font-size: 12px; color: #5a7a99; font-weight: 700; margin-top: 4px; }
#modalBody input[type="datetime-local"] { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; }
.tedit input { min-width: 0; }
#progWrap { position: fixed; inset: 0; background: rgba(10,30,50,.45); z-index: 300; display: flex; align-items: center; justify-content: center; }
#progWrap[hidden] { display: none; }
#progCard { background: #fff; border-radius: 16px; padding: 20px 22px; width: min(78vw, 300px); box-shadow: 0 10px 30px rgba(0,30,60,.35); text-align: center; }
#progTitle { font-weight: 800; color: #14324f; margin-bottom: 12px; font-size: 16px; }
#progBarWrap { height: 14px; background: #dceefb; border-radius: 7px; overflow: hidden; }
#progBar { height: 100%; width: 0%; background: linear-gradient(90deg, #57a0d8, #ffd83d); border-radius: 7px; transition: width .3s ease; }
#progEta { margin-top: 10px; font-size: 13px; color: #2c5a86; font-weight: 600; }

#modalWrap, #progWrap, .bookovl { overscroll-behavior: contain; }

#histBtn { background: rgba(255,255,255,.88); color: #14324f; border: 0; border-radius: 10px; height: 40px; padding: 0 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; flex: none; font-family: inherit; box-shadow: 0 2px 5px rgba(20,70,120,.25); margin-right: 8px; }
.histlist { text-align: left; font-size: 13.5px; line-height: 1.9; max-height: 50dvh; overflow-y: auto; }

/* ===== v52: detail fit + buttons ===== */
.dcircle { width: min(76vw, 39dvh, 320px); margin-top: 2px; }
.dcenter { width: 96px; height: 96px; }
.dgoku { margin-top: 6px; }
.gchip { height: 34px; }
.limrow { margin-top: 8px; padding: 10px 14px; }
.dbback { width: min(92%, 340px); height: 44px; border-radius: 14px; margin: 8px auto 2px; font-size: 14.5px; background: #fff; color: #1463b4; border: 2px solid #57a0d8; box-shadow: 0 2px 4px rgba(20,70,120,.2); }
.dbback.primary { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; border: 0; box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 2px 4px rgba(20,70,120,.25); }
.dbback:active { transform: scale(.98); }
#bsGo { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 2px 4px rgba(20,70,120,.25); }

/* ===== v55: phone-width column + history rows ===== */
#app { max-width: 430px; margin: 0 auto; box-shadow: 0 0 24px rgba(10, 50, 90, .35); }
#modalWrap, #progWrap, .bookovl { left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; }
#toast { max-width: min(92vw, 400px); }
.histlist { line-height: 1.5; }
.hrow { padding: 6px 0; border-bottom: 1px solid #e3eef7; }
.hrow:last-child { border-bottom: 0; }
.htop { font-size: 11.5px; color: #5a7a99; font-weight: 700; }
.hbody { display: flex; gap: 6px; align-items: baseline; font-size: 13.5px; }
.htx { flex: 1; }
.hck { flex: none; }

.xbtn { display: inline-block; background: #000; color: #fff; font-weight: 800; font-size: 14px; padding: 10px 22px; border-radius: 999px; text-decoration: none; }

/* ===== v57: watch rank panel ===== */
.pcenter { top: 49.5%; width: 44%; aspect-ratio: 2.5; border-radius: 999px; background: radial-gradient(ellipse at 50% 38%, #3a4152, #161a24 78%); border: 2px solid #cfd6dd; flex-direction: row; gap: 5px; padding: 4px 10px; cursor: pointer; font-family: inherit; }
.pcenter .pwatch { width: auto; height: 92%; aspect-ratio: 1; object-fit: contain; border-radius: 0; }
.prankTx { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.prankLb { color: #fff; font-weight: 800; font-size: 11.5px; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap; }
.pcenter .prankImg { height: 26px; width: auto; object-fit: contain; border-radius: 0; }
.rankgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rankbtn { background: linear-gradient(180deg, #eaf7ff, #bfe4fb); border: 2px solid #57a0d8; border-radius: 14px; padding: 10px 4px; cursor: pointer; }
.rankbtn img { height: 34px; }
.rankbtn.cur { background: linear-gradient(180deg, #fff3a0, #ffd83d); border-color: #e0a800; }

/* ===== v58: item grid / yokai rows / history undo ===== */
.igrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 2px; padding: 8px 2px; }
.icell { position: relative; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.icell img { width: 100%; max-width: 54px; aspect-ratio: 1; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 2px 2px rgba(0,60,120,.35)); }
.icell:active img { transform: scale(1.15); }
.icell.off img { filter: grayscale(.8); opacity: .35; }
.icell.half img { opacity: .55; }
.icnt { position: absolute; right: 1px; bottom: -3px; font-size: 16px; font-weight: 900; font-style: italic; color: #fff; text-shadow: -1.5px 0 0 #6b4423, 1.5px 0 0 #6b4423, 0 -1.5px 0 #6b4423, 0 1.5px 0 #6b4423, -1.5px -1.5px 0 #6b4423, 1.5px -1.5px 0 #6b4423, -1.5px 1.5px 0 #6b4423, 1.5px 1.5px 0 #6b4423; }
.ykrow { display: flex; align-items: center; gap: 10px; width: 100%; background: linear-gradient(180deg, #eaf7ff, #bfe4fb 60%, #a3d4f9); border: 2px solid #57a0d8; border-radius: 16px; padding: 6px 10px; margin-bottom: 8px; cursor: pointer; font-family: inherit; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.8), 0 2px 5px rgba(0,60,120,.18); text-align: left; }
.ykrow:active { background: linear-gradient(180deg, #fff3a0, #ffd83d 65%, #ffc61a); border-color: #e0a800; }
.ykm { width: 46px; height: 46px; max-width: 46px; flex: none; }
.ykname { flex: 1; font-weight: 800; font-size: 16.5px; color: #14324f; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yksp { display: block; font-size: 11px; color: #5a7a99; font-weight: 600; }
.yklv, .ykrank { flex: none; display: flex; align-items: center; gap: 3px; background: linear-gradient(180deg, #4aa7e8, #1d6fd1); color: #fff; border-radius: 9px; padding: 3px 8px; font-weight: 900; font-style: italic; font-size: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.yklv small, .ykrank small { font-size: 10px; font-style: normal; font-weight: 800; }
.ykrank img { height: 19px; width: auto; }
.hrow.done .htx { color: #8aa3b8; text-decoration: line-through; }
.hund { flex: none; background: #fff; border: 2px solid #e06666; color: #c22; border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 2px 10px; cursor: pointer; font-family: inherit; }
.hdone { flex: none; font-size: 11px; color: #8aa3b8; font-weight: 700; }

/* v64: slot cards + toolbar colors */
.cpickhead { margin-top: 12px; font-size: 16px; font-weight: 900; color: #14324f; }
.slotcards { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.slotcard { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 3px solid #fff; border-radius: 16px; padding: 8px 12px; cursor: pointer; background: linear-gradient(180deg, #e3c8f7, #c39bf0 55%, #a678e3); color: #3a2358; box-shadow: 0 3px 6px rgba(30,60,110,.25); font-family: inherit; }
.slotcard.sel { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; }
.slotcard.src { opacity: .78; }
.slotcard:active { transform: scale(.98); }
.scnum { display: flex; flex-direction: column; align-items: center; line-height: 1; flex: none; }
.scnum small { font-size: 10px; font-weight: 800; }
.scnum b { font-size: 30px; font-weight: 900; }
.scface { width: 52px; height: 52px; object-fit: cover; object-position: top; border-radius: 10px; background: transparent; flex: none; }
.scmain { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scname { font-size: 19px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sctime { font-size: 13px; font-weight: 700; opacity: .85; }
.scstar { color: #ffb400; font-size: 22px; flex: none; text-shadow: 0 1px 0 #fff; }
.scsrc { flex: none; background: #3a2358; color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 9px; }
.cpicknote { margin-top: 10px; font-size: 12px; color: #5a7a99; font-weight: 700; }
.yoktb button { font-size: 12px; padding: 10px 2px; }
button.tb-sort { background: #fff; border: 2px solid #57a0d8; color: #1463b4; font-weight: 800; }
button.tb-rev { background: linear-gradient(180deg, #7cc0f5, #3f96dd); color: #fff; font-weight: 800; }
button.tb-majime { background: linear-gradient(180deg, #cfa9f7, #9b6fe0); color: #fff; font-weight: 800; }
button.tb-add { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; font-weight: 900; }
button.tb-comp { background: linear-gradient(180deg, #ff9d7a, #f2603c); color: #fff; font-weight: 900; }
button.tb-circle { background: linear-gradient(180deg, #7cc0f5, #3f96dd); color: #fff; font-weight: 900; }

/* v65: no long-press image callout */
img { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
.cpickfoot { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
#cpNext { flex: 1; height: 50px; border: 0; border-radius: 14px; font-size: 17px; font-weight: 900; font-family: inherit; cursor: pointer; background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; box-shadow: 0 3px 6px rgba(30,60,110,.25); }
#cpNext:disabled { background: #cfd8e0; color: #7a8a99; box-shadow: none; cursor: default; }
#cpNext:active:not(:disabled) { transform: scale(.98); }
.cpsub { flex: none; height: 50px; padding: 0 14px; border-radius: 14px; border: 2px solid #57a0d8; background: #fff; color: #1463b4; font-size: 13px; font-weight: 800; font-family: inherit; cursor: pointer; }
.labcur { color: #e03131; font-weight: 900; font-size: 15px; margin: 12px 0 2px; }
.swapbtn { display: block; width: min(92%, 340px); margin: 10px auto 0; height: 44px; border-radius: 14px; border: 2px solid #57a0d8; background: #fff; color: #1463b4; font-size: 15px; font-weight: 800; font-family: inherit; cursor: pointer; }
.swapbtn.on { background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; border-color: #e0a800; }
.swapbtn:active { transform: scale(.98); }
.qbulk { gap: 6px; }
.qbulk button { flex: 1; font-size: 12.5px; padding: 10px 2px; white-space: nowrap; }
html { overscroll-behavior: none; }
body { touch-action: none; }
#list, #modalCard { touch-action: pan-y; overscroll-behavior: contain; }
.watchmark { width: 24px; height: 24px; flex: none; }

.stickybar { position: sticky; top: 0; z-index: 6; background: linear-gradient(180deg, rgba(234,247,255,.97), rgba(213,236,252,.97)); border-radius: 12px; padding: 5px; box-shadow: 0 3px 8px rgba(20,70,120,.22); }
.stickybar .toolbar { margin-top: 0; }

/* v78 unified back buttons */
#backBtn, .yoktb button.bk, .row.backbtn, .dbback, .cpsub { background: #fff; border: 2px solid #57a0d8; color: #1463b4; font-weight: 700; border-radius: 12px; box-shadow: 0 2px 4px rgba(20,70,120,.18); }
#backBtn { height: 44px; padding: 0 16px; font-size: 14.5px; }
.yoktb button.bk { height: 44px; padding: 0 16px; font-size: 14.5px; }
.row.backbtn { height: 44px; }
.row.backbtn .tx::before { content: '‹ '; font-weight: 900; }
.cpsub { height: 44px; font-size: 14.5px; }

/* v83 detail tile grid */
.dwrap { position: relative; width: min(94vw, 410px); margin: 4px auto 0; }
.dwrap .dbg { width: 62%; height: 62%; z-index: 0; }
.dgrid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dgrid .sat { position: relative; transform: none; width: auto; height: auto; min-height: 56px; border-radius: 14px; padding: 4px; }
.dgrid .dcenter { position: relative; left: auto; top: auto; transform: none; justify-self: center; align-self: center; width: 104px; height: 104px; grid-column: 2 / span 2; grid-row: 2; }
.g-majime { grid-column: 1; grid-row: 1; }
.g-nick { grid-column: 2 / span 2; grid-row: 1; }
.g-level { grid-column: 4; grid-row: 1; }
.g-ev { grid-column: 1; grid-row: 2; }
.g-exp { grid-column: 4; grid-row: 2; }
.g-ivb2 { grid-column: 1; grid-row: 3; }
.g-ivb1 { grid-column: 2; grid-row: 3; }
.g-iva { grid-column: 3; grid-row: 3; }
.g-pers { grid-column: 4; grid-row: 3; }

/* v87 download tile: diary flipped */
.mtimg.flipy img { transform: scaleY(-1); }

/* v89 book overlay: book lowered, header buttons restyled, bigger close */
#bSpreadBox { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.bookovl .bspread { margin: 0; }
.bclose { width: 48px; height: 48px; font-size: 22px; font-weight: 700; background: #fff; color: #14324f; }
.bbtn { background: #ffd83d; color: #14324f; border-radius: 999px; padding: 10px 16px; font-size: 14px; min-height: 44px; }
.bookovl .pager button { background: #fff; color: #14324f; border: none; border-radius: 999px; min-width: 96px; height: 48px; font-size: 16px; font-weight: 700; }

/* v92 detail list */
.dicon { display: flex; justify-content: center; margin: 8px 0 12px; }
.diconbtn { width: 104px; height: 104px; border-radius: 50%; border: 6px solid #8e8e93; background: #1c1c22; padding: 0; cursor: pointer; overflow: hidden; }
.diconbtn img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.42); display: block; }
.dcard { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(20,50,79,.14); margin-bottom: 14px; }
.drow { display: flex; align-items: center; gap: 7px; width: 100%; padding: 13px 14px; background: #fff; border: none; border-bottom: 1px solid #e3eef7; font-family: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.drow:last-child { border-bottom: none; }
.drn { font-size: 13.5px; color: #5b7a94; font-weight: 700; flex: none; width: 84px; }
.drv { flex: 1; font-size: 15px; font-weight: 700; color: #14324f; text-align: right; }
.drc { color: #9db8cc; font-size: 19px; flex: none; }
.drup { color: #ff8a00; font-weight: 900; flex: none; }
.drq { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #dceefb; color: #1463b4; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* v93 puni tile: fit whole face */

/* v96: detail screen control sizes unified */
.drow { padding: 11px 14px; }
.gchip { height: 44px; font-size: 14px; border-radius: 12px; }
.limrow { padding: 8px 8px 8px 14px; }
.limbtn { height: 40px; width: 78px; font-size: 14px; border-radius: 12px; }
.dbback { width: 100%; height: 48px; font-size: 15.5px; border-radius: 12px; margin: 8px 0 0; }

/* v97: wide screens (iPad / PC) scale up instead of a narrow 430px column */
@media (min-width: 620px) {
  #app { max-width: 660px; }
  #modalWrap, #progWrap, .bookovl { max-width: 660px; }
  #modalCard { max-width: 600px; }
  #toast { max-width: 560px; font-size: 15.5px; }
  .pstage { width: min(92%, 600px); }
  body { font-size: 17px; }
  #title { font-size: 21px; }
  #status { font-size: 14px; }
  #histBtn { font-size: 15.5px; padding: 10px 18px; }
  #cardName { font-size: 19px; }
  #cardMeta button { font-size: 14.5px; padding: 10px 4px; }
  #moneyPill { font-size: 16.5px; padding: 11px 18px; }
  .seg button { font-size: 15.5px; padding: 10px 2px; }
  .mtlb { font-size: 17px; bottom: 9px; }
  .mdot { width: 26px; height: 26px; }
  .hpager { font-size: 15.5px; }
  .pgbtn { width: 58px; height: 42px; font-size: 16px; border-radius: 21px; }
  .row { height: 62px; font-size: 16.5px; padding: 0 16px; }
  .row img.ic { width: 46px; height: 46px; }
  .row .dt { font-size: 14px; }
  .diconbtn { width: 128px; height: 128px; }
  .drow { padding: 14px 18px; font-size: 16.5px; }
  .gchip { height: 50px; font-size: 15.5px; }
  .dbback { height: 54px; font-size: 17px; }
  .limrow { font-size: 16px; }
  .limbtn { height: 44px; width: 88px; font-size: 15.5px; }
  .ykm { width: 56px; height: 56px; max-width: 56px; }
  .icell img { max-width: 68px; }
  #modalBtns button { font-size: 16px; padding: 13px 6px; }
  .bbtn { font-size: 15px; padding: 10px 14px; }
}
@media (min-width: 1024px) {
  #app { max-width: 780px; }
  #modalWrap, #progWrap, .bookovl { max-width: 780px; }
  #modalCard { max-width: 680px; }
  .pstage { width: min(92%, 680px); }
  .mtlb { font-size: 19px; }
}

/* v99: detail screen, game-style chunky high-contrast controls */
.dname { font-size: 23px; font-weight: 800; }
.dsub { font-size: 13.5px; }
.diconbtn { width: 116px; height: 116px; border-width: 7px; }
.dcard { border: 3px solid #57a0d8; border-radius: 18px; }
.drow { min-height: 57px; padding: 10px 14px; }
.drn { font-size: 15px; color: #1463b4; width: 92px; }
.drv { font-size: 18px; }
.drq { width: 26px; height: 26px; font-size: 15px; background: #57a0d8; color: #fff; }
.dgokuL { font-size: 15.5px; }
.gchip { height: 52px; font-size: 15.5px; border-radius: 14px; background: linear-gradient(180deg, #fff3a0, #ffd83d 60%, #ffc61a); color: #5a3a00; border: 3px solid #b97e0a; box-shadow: 0 3px 0 #b97e0a, 0 4px 6px rgba(20,70,120,.25); }
.limrow { padding: 10px 10px 10px 16px; font-size: 15.5px; border: 3px solid #57a0d8; }
.limbtn { width: 94px; height: 46px; font-size: 16.5px; border-radius: 14px; background: #5a7a99; color: #fff; border: 3px solid #3d5a75; box-shadow: 0 3px 0 #3d5a75; }
.limbtn.on { background: linear-gradient(180deg, #ff8a80, #f44336); border-color: #b71c1c; box-shadow: 0 3px 0 #b71c1c; color: #fff; }
.dbback { height: 57px; font-size: 17px; border-radius: 16px; border: 3px solid #1463b4; box-shadow: 0 4px 0 #1463b4, 0 6px 8px rgba(20,70,120,.25); margin-top: 12px; }
.dbback.primary { border: 3px solid #b97e0a; box-shadow: 0 4px 0 #b97e0a, 0 6px 8px rgba(20,70,120,.25); color: #5a3a00; }

/* v102: detail controls must not be flex-compressed when content overflows */
.dcard, .dgoku, .limrow, .dbback { flex: none; }

/* v103: detail screen fits one screen without scrolling (v99 look, compact) */
.dwrap { gap: 7px; padding-top: 8px; }
.dname { font-size: 20px; }
.diconbtn { width: 82px; height: 82px; }
.dcard { padding: 3px 12px; }
.drow { min-height: 45px; padding: 5px 2px; }
.drn { font-size: 14px; width: 86px; }
.drv { font-size: 16.5px; }
.drq { width: 23px; height: 23px; font-size: 13px; }
.dgoku { gap: 7px; }
.dgoku .glabel { font-size: 13px; }
.gchip { height: 43px; font-size: 14.5px; }
.limrow { padding: 6px 12px; }
.limbtn { width: 84px; height: 40px; font-size: 14.5px; }
.dbback { height: 47px; font-size: 16px; }

/* v104: detail fits one screen with margin */
.dwrap { gap: 6px; padding-top: 6px; }
.diconbtn { width: 68px; height: 68px; }
.drow { min-height: 43px; }
.gchip { height: 41px; }
.dbback { height: 45px; }

/* v106: fixed device geometry - render at the phone size on every screen */
#app { max-width: 402px; }
#list.home .mgrid { flex: none; grid-template-rows: repeat(3, 104px); }
.pstage { width: min(96vw, 386px); }
@media (min-width: 620px) {
  #app { max-width: 402px; }
  #modalWrap, #progWrap, .bookovl { max-width: 402px; }
  #modalCard { max-width: 400px; }
  #toast { max-width: min(92vw, 400px); font-size: 13.5px; }
  .pstage { width: min(96vw, 386px); }
  body { font-size: 15px; }
  #title { font-size: 17px; }
  #status { font-size: 12px; }
  #histBtn { font-size: 13.5px; padding: 0 12px; }
  #cardName { font-size: 16px; }
  #cardMeta button { font-size: 12.5px; padding: 7px 4px; }
  #moneyPill { font-size: 14px; padding: 9px 14px; }
  .seg button { font-size: 13px; padding: 7px 2px; }
  .mtlb { font-size: 13.5px; bottom: 6px; }
  .mdot { width: 21px; height: 21px; }
  .hpager { font-size: 13px; }
  .pgbtn { width: 46px; height: 34px; font-size: 13px; border-radius: 17px; }
  .row { height: 54px; font-size: 15px; padding: 0 12px; }
  .row img.ic { width: 40px; height: 40px; }
  .row .dt { font-size: 12.5px; }
  .diconbtn { width: 68px; height: 68px; }
  .drow { min-height: 43px; padding: 5px 2px; font-size: 15px; }
  .gchip { height: 41px; font-size: 14.5px; }
  .dbback { height: 45px; font-size: 16px; }
  .limrow { font-size: 15.5px; }
  .limbtn { width: 84px; height: 40px; font-size: 14.5px; }
  .ykm { width: 46px; height: 46px; max-width: 46px; }
  .icell img { max-width: 54px; }
  #modalBtns button { font-size: 14px; padding: 11px 6px; }
}

/* v107: detail screen fits by flex, never scrolls; long lists render faster */
.dwrap { height: 100%; }
.dcard { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.drow { flex: 1 1 0; min-height: 34px; }
.gchip { white-space: nowrap; font-size: 13.5px; padding: 0 4px; }
.ykrow { content-visibility: auto; contain-intrinsic-size: auto 62px; }


/* v109: sound test grid */
.sndgrid { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 2px 12px; }
.sndgrid button { background: rgba(255,255,255,.88); border: 2px solid #57a0d8; color: #1463b4; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.sndgrid button:active { transform: scale(.95); }

/* v110: double-tap zoom off (manipulation keeps pan/scroll, kills dbl-tap zoom) */
#list, #modalCard, .bookovl { touch-action: manipulation; }

/* v122: real game background (mm_save_u00) with a slow drift */
body { background-color: #80cbf9; }
body::before { content: ''; position: fixed; inset: -4%; background: url('menu/bg_blue.webp?v=122') center / cover no-repeat; animation: bgDrift 34s ease-in-out infinite alternate; z-index: -1; pointer-events: none; }
body[data-girl='1']::before { background-image: url('menu/bg_pink.webp?v=122'); }
@keyframes bgDrift { from { transform: translate3d(-1.4%, -1.8%, 0) scale(1.04); } to { transform: translate3d(1.4%, 1.8%, 0) scale(1.04); } }

/* v123 detail fit: whole detail screen fits without scrolling */
#list:has(> .dcard) { overflow: hidden; }
#list:has(> .dcard) > * { flex: none; }
#list:has(> .dcard) .dname { font-size: 21px; margin-top: 0; }
#list:has(> .dcard) .dsub { font-size: 12.5px; margin-top: 1px; }
#list:has(> .dcard) .dicon { margin: 4px 0 6px; }
#list:has(> .dcard) .diconbtn { width: 76px; height: 76px; border-width: 5px; }
#list:has(> .dcard) .dcard { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
#list:has(> .dcard) .drow { flex: 1 1 0; min-height: 0; padding-top: 0; padding-bottom: 0; }
#list:has(> .dcard) .drn { font-size: 13.5px; }
#list:has(> .dcard) .drv { font-size: 14px; }
#list:has(> .dcard) .dgoku { margin-top: 6px; }
#list:has(> .dcard) .gchip { height: 38px; }
#list:has(> .dcard) .limrow { margin-top: 6px; padding: 6px 8px 6px 12px; }
#list:has(> .dcard) .limbtn { height: 36px; }
#list:has(> .dcard) .dbback { height: 42px; margin-top: 6px; font-size: 14.5px; }

/* v125 dev auth prompt */
.devlock { font-size: 34px; text-align: center; margin: 2px 0 2px; }
.devmsg { text-align: center; font-size: 13.5px; color: #5b7a94; margin-bottom: 10px; }
.devinp { width: 100%; box-sizing: border-box; font-size: 17px; padding: 12px 14px; border: 2px solid #57a0d8; border-radius: 12px; text-align: center; letter-spacing: 2px; font-family: inherit; background: #f4faff; color: #14324f; outline: none; }
.devinp:focus { border-color: #1463b4; background: #fff; }
#list:has(> .dcard) { padding-bottom: 8px; }
#list, #modalCard { touch-action: pan-y; }
#muteBtn { background: rgba(255,255,255,.88); color: #14324f; border: 0; border-radius: 10px; height: 40px; width: 52px; padding: 0; cursor: pointer; flex: none; font-family: inherit; box-shadow: 0 2px 5px rgba(20,70,120,.25); display: inline-flex; align-items: center; justify-content: center; }

.locked { opacity: .45; filter: grayscale(.7); }

/* v140 in-app admin */
.acard { background: linear-gradient(160deg, #1b2f47, #111f31); border: 1px solid #2e4d6e; border-radius: 16px; padding: 14px; margin: 10px 0; box-shadow: 0 4px 14px rgba(4,20,40,.35); color: #eaf4ff; }
.acard .devlock { text-align: center; font-size: 30px; }
.acard .devmsg { color: #9db9d4; }
.acard .devinp { width: 100%; box-sizing: border-box; margin: 8px 0; background: #0b1727; border: 2px solid #2e4d6e; color: #fff; }
.acard .devinp:focus { border-color: #ffd83d; background: #0b1727; }
.acode { font-family: monospace; font-weight: bold; font-size: 16.5px; color: #fff; letter-spacing: .02em; }
.amut { color: #9db9d4; font-size: 12.5px; margin: 4px 0 2px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.achip { display: inline-block; font-size: 11px; font-weight: 800; padding: 2.5px 9px; border-radius: 999px; color: #fff; background: #8a97a5; }
.achip.lv2 { background: #2f7fe0; }
.achip.lv3 { background: linear-gradient(120deg, #b8860b, #ffd83d); color: #402a12; }
.achip.lv4 { background: #0a0a0e; border: 1px solid #ffd83d; color: #ffd83d; }
.ahp { display: inline-block; font-size: 12px; font-weight: 700; color: #ffb3c1; background: rgba(229,72,77,.16); border: 1px solid rgba(229,72,77,.45); padding: 2px 9px; border-radius: 999px; }
.atree { margin: 8px 0 4px 8px; border-left: 2px solid #2e4d6e; padding-left: 10px; }
.aslot { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3.5px 0; color: #cfe4f7; }
.abranch { display: none; }
.aslotname { font-weight: bold; min-width: 52px; color: #fff; }
.aslotval { color: #9db9d4; }
.arow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 9px 0; }
.arow input, .acard input, .acard select { font-size: 14.5px; padding: 8px 10px; border-radius: 10px; border: 1px solid #2e4d6e; background: #0b1727; color: #eaf4ff; font-family: inherit; }
.arow input { flex: 1; min-width: 110px; }
.arow input::placeholder, .acard input::placeholder { color: #5f7d99; }
.acard table.atab td { padding: 4px 8px 4px 0; font-size: 13.5px; color: #cfe4f7; }
.acard table.atab input { width: 64px; text-align: center; }
.abtn { background: linear-gradient(180deg, #ffd83d, #f5b301); color: #402a12; border: 0; font-weight: 800; cursor: pointer; font-size: 14px; padding: 9px 14px; border-radius: 10px; font-family: inherit; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.abtn.sub { background: rgba(11,23,39,.55); color: #3ec6ff; border: 1.5px solid #3ec6ff; box-shadow: none; }
.abtn.danger { background: #e5484d; color: #fff; }
.ainfo { font-size: 13px; color: #cfe4f7; background: rgba(11,23,39,.55); border: 1px solid #2e4d6e; padding: 4px 10px; border-radius: 999px; }
.afrow { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid rgba(62,110,160,.25); }
.afrow:last-child { border-bottom: 0; }
.aflb { flex: 1; font-size: 13px; color: #eaf4ff; line-height: 1.3; }
.afrow select { width: 118px; flex: none; }
.afht { display: flex; align-items: center; gap: 3px; font-size: 13px; flex: none; }
.afht input { width: 52px; text-align: center; padding: 6px 4px; }
.afna { font-size: 12px; color: #8fb8dd; width: 76px; text-align: center; flex: none; }
.acfgsec { margin-top: 14px; }
.acfgh { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: #ffd83d; margin-bottom: 6px; }
.acfgrow { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid rgba(62,110,160,.25); }
.acfgrow:last-child { border-bottom: 0; }
.acfgrow input { width: 76px; text-align: center; }
.acfggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acfgcell { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: rgba(11,23,39,.55); border: 1px solid #2e4d6e; border-radius: 10px; padding: 6px 8px; margin: 0; }
.acfgcell span { font-size: 11.5px; color: #cfe4f7; line-height: 1.3; }
.acfgcell input { width: 50px; text-align: center; padding: 6px 4px; }
