/* CraftVal Toko Web - tampilan bergaya Minecraft. Huruf judul: Monocraft (OFL). */
@font-face { font-family: "Monocraft"; src: url("fonts/Monocraft.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #e8e2d2; --bg2: #ddd5c0; --panel: #f7f3e8; --panel2: #efe9d8; --ink: #2a251d; --muted: #6a6252; --edge: #2e2a22;
  --hi: rgba(255,255,255,.55); --lo: rgba(0,0,0,.22);
  --grass: #5aa02c; --grass2: #437a1f; --gold: #e3a21a; --gold2: #b9800c; --red: #c0392b; --red2: #8f2a20; --blue: #2f7fc1; --stone: #8a8a8a; --slot: #c9c1ab; --slot-edge: #8d856f;
  --ok-bg: #dff0cf; --err-bg: #f6d8d3; --warn-bg: #f8ecc4; --info-bg: #dbe9f6;
  --font-pix: "Monocraft", ui-monospace, Menlo, Consolas, monospace;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #17171a; --bg2: #202024; --panel: #26262c; --panel2: #1f1f24; --ink: #ece7d8; --muted: #a39c8a; --edge: #0b0b0d;
  --hi: rgba(255,255,255,.14); --lo: rgba(0,0,0,.45);
  --grass: #6dbb35; --grass2: #4a8a23; --gold: #f2b632; --gold2: #b8820f; --red: #d9503f; --red2: #9a3326; --blue: #4a9be0; --stone: #6f6f78; --slot: #34343b; --slot-edge: #1a1a1f;
  --ok-bg: #20361a; --err-bg: #3a1e1a; --warn-bg: #3a3014; --info-bg: #16293a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column;
  background-image: linear-gradient(var(--bg), var(--bg)); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: radial-gradient(var(--bg2) 1.2px, transparent 1.4px); background-size: 22px 22px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-pix); font-weight: 400; line-height: 1.25; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(1.35rem, 3.2vw, 2rem); } h2 { font-size: clamp(1.1rem, 2.4vw, 1.4rem); } h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 24px 0 48px; }
.sr { position: absolute; left: -9999px; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; flex: none; }
.coin { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex: none; }

/* header */
.top { background: #2b2822; color: #ece7d8; border-bottom: 4px solid #1a1814; position: sticky; top: 0; z-index: 30; }
:root[data-theme="dark"] .top { background: #101012; border-bottom-color: #000; }
.top::after { content: ""; display: block; height: 5px; background: repeating-linear-gradient(90deg, var(--grass) 0 18px, var(--grass2) 18px 36px); }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-pix); font-size: 1.05rem; text-decoration: none !important; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; image-rendering: pixelated; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; flex-wrap: nowrap; min-width: 0; }
.nav a { white-space: nowrap; color: #d8d2c0; padding: 8px 8px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-pix); font-size: .7rem; text-decoration: none !important; border: 2px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.on { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.badge { background: var(--red); color: #fff; font-size: .68rem; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; font-family: var(--font); font-weight: 700; }
.usr { display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.18); padding: 4px 10px; color: #fff; font-family: var(--font-pix); font-size: .76rem; }
.iconbtn { background: transparent; border: 2px solid rgba(255,255,255,.2); color: #ece7d8; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.iconbtn:hover { background: rgba(255,255,255,.1); }
#navtog { display: none; }
.ptsbox { margin-left: auto; order: 5; }
.usr { order: 6; }
@media (max-width: 1180px) {
  #navtog { display: inline-flex; order: 7; }
  .top .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; gap: 10px; }
  .ptsbox { order: 5; }
  .nav, .usr { display: none; flex: 0 0 100%; width: 100%; max-width: 100%; margin: 0; order: 10; }
  .nav.open { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding-top: 6px; }
  .nav.open a { min-height: 46px; padding: 10px 12px; font-size: .78rem; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); }
  .usr.open { display: flex; flex-wrap: wrap; padding-bottom: 6px; order: 11; }
}

/* panel & tombol bergaya inventory */
.panel { background: var(--panel); border: 3px solid var(--edge); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); padding: 18px; margin-bottom: 18px; }
.panel.flat { padding: 0; overflow: hidden; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, 1fr); } .stat b { font-size: 1.2rem; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }

.btn { font-family: var(--font-pix); font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 42px; cursor: pointer; color: #fff; background: var(--grass); border: 3px solid var(--edge); box-shadow: inset 3px 3px 0 rgba(255,255,255,.35), inset -3px -3px 0 rgba(0,0,0,.3); text-decoration: none !important; text-shadow: 1px 1px 0 rgba(0,0,0,.35); line-height: 1.1; user-select: none; }
.btn:hover { filter: brightness(1.08); }
.btn:active { box-shadow: inset 3px 3px 0 rgba(0,0,0,.3), inset -3px -3px 0 rgba(255,255,255,.2); transform: translateY(1px); }
.btn:disabled, .btn.off { filter: grayscale(1) brightness(.8); cursor: not-allowed; }
.btn.gold { background: var(--gold); color: #2a1d00; text-shadow: none; }
.btn.stone { background: var(--stone); }
.btn.red { background: var(--red); }
.btn.blue { background: var(--blue); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: .72rem; }
.btn.block { width: 100%; }

label { display: block; font-family: var(--font-pix); font-size: .74rem; margin: 0 0 6px; color: var(--muted); }
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=search], input[type=url], input[type=email], select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--panel2); border: 3px solid var(--edge); border-right-color: var(--hi); border-bottom-color: var(--hi); padding: 10px 12px; min-height: 44px; border-radius: 0; box-shadow: inset 2px 2px 0 var(--lo); }
textarea { min-height: 110px; resize: vertical; }
input:not([type]):focus, input:focus, select:focus, textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.field { margin-bottom: 14px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 5px; }

.alert { padding: 11px 14px; border: 3px solid var(--edge); margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.ok { background: var(--ok-bg); } .alert.err { background: var(--err-bg); } .alert.warn { background: var(--warn-bg); } .alert.info { background: var(--info-bg); }
.alert .x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 0 4px; font-size: 1.1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--slot-edge); vertical-align: middle; }
th { font-family: var(--font-pix); font-size: .72rem; color: var(--muted); font-weight: 400; background: var(--panel2); white-space: nowrap; }
tr:hover td { background: var(--panel2); }
.tbl { overflow-x: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 9px; font-family: var(--font-pix); font-size: .66rem; border: 2px solid var(--edge); background: var(--slot); color: var(--ink); white-space: nowrap; }
.pill.pending, .pill.sent { background: var(--warn-bg); } .pill.paid { background: var(--info-bg); } .pill.delivered, .pill.done, .pill.on { background: var(--ok-bg); } .pill.failed, .pill.cancelled, .pill.off { background: var(--err-bg); }

/* beranda */
.hero { text-align: center; padding: 34px 18px; background: linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.0)), var(--panel); }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); }
.hero p.lead { max-width: 640px; margin: 0 auto 20px; color: var(--muted); font-size: 1.05rem; }
.ipbox { display: flex; gap: 8px; align-items: center; background: var(--panel2); border: 3px solid var(--edge); padding: 8px 10px; }
.ipbox code { font-family: var(--font-pix); font-size: .85rem; word-break: break-all; flex: 1; }
.ipbox small { display: block; font-family: var(--font-pix); font-size: .62rem; color: var(--muted); }
.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 58px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 14px; left: 16px; width: 30px; height: 30px; background: var(--grass); color: #fff; border: 3px solid var(--edge); display: flex; align-items: center; justify-content: center; font-family: var(--font-pix); font-size: .85rem; }
.step code, code.cmd { background: var(--panel2); border: 2px solid var(--slot-edge); padding: 1px 6px; font-family: var(--font-pix); font-size: .76rem; word-break: break-word; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--font-pix); font-size: 1.5rem; font-weight: 400; }
.stat span { font-size: .85rem; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-pix); font-size: .72rem; }
.dot { width: 10px; height: 10px; background: var(--stone); border: 2px solid var(--edge); display: inline-block; }
.dot.on { background: var(--grass); box-shadow: 0 0 0 0 var(--grass); animation: pulse 2s infinite; }
.dot.off { background: var(--red); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(90,160,44,.7); } 70% { box-shadow: 0 0 0 8px rgba(90,160,44,0); } 100% { box-shadow: 0 0 0 0 rgba(90,160,44,0); } }

/* toko */
.shopbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.shopbar .grow { flex: 1; min-width: 200px; position: relative; }
.shopbar .grow .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.shopbar input[type=search] { padding-left: 38px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cats button { font-family: var(--font-pix); font-size: .7rem; padding: 7px 11px; cursor: pointer; background: var(--panel2); color: var(--ink); border: 3px solid var(--edge); }
.cats button.on { background: var(--grass); color: #fff; }
.items { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card { background: var(--panel); border: 3px solid var(--edge); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); padding: 14px; display: flex; flex-direction: column; gap: 8px; transition: transform .12s; }
.card:hover { transform: translateY(-2px); }
.card.feat { border-color: var(--gold2); }
.slot { width: 64px; height: 64px; background: var(--slot); border: 3px solid var(--slot-edge); border-right-color: var(--hi); border-bottom-color: var(--hi); display: flex; align-items: center; justify-content: center; position: relative; flex: none; }
.slot img, .mcicon { width: 44px; height: 44px; image-rendering: auto; object-fit: cover; object-position: top; }
.slot .amt { position: absolute; right: 2px; bottom: 0; font-family: var(--font-pix); font-size: .72rem; color: #fff; text-shadow: 2px 2px 0 #222; }
.card h3 { margin: 0; font-size: .86rem; word-break: break-word; }
.card .tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.tag { font-size: .7rem; padding: 1px 7px; background: var(--slot); border: 2px solid var(--slot-edge); color: var(--ink); }
.tag.ench { background: #e5d6f3; color: #3c1f5c; border-color: #9a7bbd; } :root[data-theme="dark"] .tag.ench { background: #3b2a52; color: #e7d7ff; border-color: #6f4fa0; }
.price { font-family: var(--font-pix); font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.price.low { color: var(--red); }
.buyrow { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.qty { display: inline-flex; align-items: stretch; border: 3px solid var(--edge); }
.qty button { width: 32px; background: var(--slot); border: 0; color: var(--ink); cursor: pointer; font-family: var(--font-pix); }
.qty input { width: 48px; border: 0; text-align: center; min-height: 36px; padding: 0; box-shadow: none; background: var(--panel2); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.balbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.balbar .big { font-family: var(--font-pix); font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }

/* modal & toast */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.65); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.show { display: flex; animation: fade .15s; }
.modal .box { background: var(--panel); border: 4px solid var(--edge); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); width: 100%; max-width: 440px; padding: 22px; max-height: 90vh; overflow: auto; }
.modal h2 { margin-top: 0; }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
#toasts { position: fixed; right: 14px; bottom: 14px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 28px); }
.toast { background: var(--panel); border: 3px solid var(--edge); box-shadow: 4px 4px 0 rgba(0,0,0,.35); padding: 10px 14px; animation: fade .2s; max-width: 360px; }
.toast.ok { border-left: 8px solid var(--grass); } .toast.err { border-left: 8px solid var(--red); } .toast.info { border-left: 8px solid var(--blue); }

.prog { height: 14px; background: var(--slot); border: 3px solid var(--edge); overflow: hidden; }
.prog i { display: block; height: 100%; width: 30%; background: repeating-linear-gradient(90deg, var(--grass) 0 10px, var(--grass2) 10px 20px); animation: slide 1.1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(380%); } }

.avatar { width: 64px; height: 64px; border: 3px solid var(--edge); image-rendering: pixelated; background: var(--slot); display: flex; align-items: center; justify-content: center; font-family: var(--font-pix); font-size: 1.4rem; overflow: hidden; flex: none; }
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; image-rendering: pixelated; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { font-family: var(--font-pix); font-size: .74rem; padding: 8px 14px; background: var(--panel2); border: 3px solid var(--edge); color: var(--ink); text-decoration: none !important; }
.tabs a.on { background: var(--grass); color: #fff; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 2px solid var(--slot-edge); }
.notif.unread { background: var(--info-bg); }
.notif .nt { font-family: var(--font-pix); font-size: .78rem; }
.rank1 td:first-child { color: var(--gold2); } .rank { font-family: var(--font-pix); width: 56px; }

footer.foot { border-top: 4px solid var(--edge); background: #2b2822; color: #b9b2a0; padding: 18px 0; font-size: .86rem; }
:root[data-theme="dark"] footer.foot { background: #101012; }
footer.foot a { color: #d8d2c0; }

@media (max-width: 420px) { .brand span { display: none; } }
/* admin */
.adm { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.side.panel { animation: none; }
.side { position: sticky; top: 86px; padding: 10px !important; }
.sidehd { display: none; }
.sg { font-family: var(--font-pix); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 5px; } .sg:first-of-type { padding-top: 4px; }
.side a { border-left-width: 5px !important; }
.side a .ico { width: 1.3em; height: 1.3em; flex: none; }
.admbar, .admback { display: none; }
.side a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: var(--ink); font-family: var(--font-pix); font-size: .76rem; border: 3px solid transparent; text-decoration: none !important; }
.side a:hover { background: var(--panel2); }
.side a.on { background: var(--grass); color: #fff; border-color: var(--edge); }
@media (max-width: 860px) {
  .adm { grid-template-columns: 1fr; }
  .admbar { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 10px 14px; cursor: pointer; text-align: left; color: var(--ink); background: var(--panel); border: 3px solid var(--edge); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); font: inherit; }
  .admbar .ico { width: 1.5em; height: 1.5em; } .admbar small { display: block; color: var(--muted); font-size: .7rem; line-height: 1.1; } .admbar b { font-family: var(--font-pix); font-size: .85rem; font-weight: 400; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); z-index: 120; margin: 0; overflow-y: auto; transform: translateX(-105%); transition: transform .22s ease; border-width: 0 4px 0 0; }
  .side.open { transform: none; }
  .sidehd { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 6px 10px; font-family: var(--font-pix); } .sidehd .iconbtn { color: var(--ink); border-color: var(--edge); }
  .side a { padding: 12px 12px; font-size: .8rem; }
  .admback { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s; } .admback.show { opacity: 1; pointer-events: auto; }
  body.noscroll { overflow: hidden; }
}
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi .panel { margin: 0; text-align: center; padding: 14px 8px; }
.kpi b { display: block; font-family: var(--font-pix); font-size: 1.35rem; font-weight: 400; }
.kpi span { font-size: .8rem; color: var(--muted); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
code.block { display: block; white-space: pre-wrap; padding: 10px 12px; background: var(--panel2); border: 3px solid var(--edge); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- inventori & aksi (1.68) ---- */
:root { --is: 44px; }
@media (max-width: 560px) { :root { --is: 31px; } }
.invw { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.icol { display: grid; gap: 3px; }
.igrid { display: grid; grid-template-columns: repeat(9, minmax(0, var(--is))); gap: 3px; max-width: 100%; }
.igrid.hot { margin-top: 10px; }
.islot { width: 100%; aspect-ratio: 1; min-width: 0; background: var(--slot); border: 2px solid var(--slot-edge); border-right-color: var(--hi); border-bottom-color: var(--hi); position: relative; display: flex; align-items: center; justify-content: center; }
.islot img.mcicon { width: calc(var(--is) - 10px); height: calc(var(--is) - 10px); image-rendering: auto; object-fit: contain; }
.islot .amt { position: absolute; right: 1px; bottom: -1px; font-family: var(--font-pix); font-size: .6rem; color: #fff; text-shadow: 1px 1px 0 #222; }
.islot .dur { position: absolute; left: 3px; right: 3px; bottom: 2px; height: 3px; background: #222; } .islot .dur i { display: block; height: 100%; }
.islot .gl { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(180,120,255,.28), rgba(180,120,255,0) 60%); pointer-events: none; }
.islot.held { outline: 3px solid var(--gold); outline-offset: 0; }
.actgrid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.inl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inl select, .inl input { flex: 1; min-width: 140px; }
.art h3 { margin: 18px 0 6px; } .art ul { margin: 6px 0 12px 20px; } .art li { margin: 3px 0; } .art p { margin: 8px 0; line-height: 1.6; }
.skin i { image-rendering: pixelated; }
.opres { font-size: .85rem; }

/* jarak antar baris form */
.panel form .row + .row, .panel > .row + .row { margin-top: 14px; }
.panel .row > div > label { margin-top: 0; }
/* animasi bergaya Minecraft */
.panel, .stat, .slot, .step { animation: fade .28s ease-out both; }
.btn:active { transform: translateY(3px); box-shadow: inset 3px 3px 0 rgba(0,0,0,.3), inset -3px -3px 0 rgba(255,255,255,.2); }
.btn { transition: filter .08s, transform .05s; } .btn:hover { filter: brightness(1.12); }
.mcicon { image-rendering: auto; }
.slot:hover .mcicon, .islot:hover .mcicon, tr:hover > td > .mcicon { animation: bob .6s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-3px) rotate(-4deg); } }
.coin, .chip svg { animation: coinspin 3.2s steps(8) infinite; }
@keyframes coinspin { 0%, 90% { transform: none; } 95% { transform: scaleX(.2); } 100% { transform: none; } }
.toast { animation: toastin .25s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes toastin { from { transform: translateY(20px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.nav a:hover, .menu a:hover { background: rgba(255,255,255,.12); }
.top::after { content: ""; display: block; }

/* pemilih item */
.pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); background: var(--panel2); border: 3px solid var(--edge); border-right-color: var(--hi); border-bottom-color: var(--hi); box-shadow: inset 2px 2px 0 var(--lo); }
.pick .pv { width: 34px; height: 34px; flex: none; display: flex; } .pick .pn { flex: 1; } .pick .pc { font-family: var(--font-pix); font-size: .7rem; background: var(--grass); color: #fff; padding: 4px 8px; border: 2px solid var(--edge); }
.pkov { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; } .pkov[hidden] { display: none; }
.pkbox { background: var(--panel); border: 3px solid var(--edge); padding: 14px; width: min(860px, 100%); max-height: 88vh; overflow: auto; }
.pkbox { display: flex; flex-direction: column; overflow: hidden; } .pkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; overflow: auto; flex: 1; min-height: 200px; }
.pktabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; }
.pkt { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 10px; cursor: pointer; font-family: var(--font-pix); font-size: .62rem; color: var(--ink); background: var(--panel2); border: 3px solid var(--edge); white-space: nowrap; } .pkt img { width: 24px; height: 24px; } .pkt.on { background: var(--grass); color: #fff; }
.pki { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; cursor: pointer; background: var(--slot); border: 3px solid var(--slot-edge); color: var(--ink); font: inherit; }
.pki:hover { border-color: var(--gold); transform: translateY(-2px); } .pki img { width: 48px; height: 48px; } .pki span { font-size: .62rem; line-height: 1.1; text-align: center; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip2 { font-family: var(--font-pix); font-size: .62rem; padding: 6px 9px; cursor: pointer; color: var(--ink); background: var(--panel2); border: 3px solid var(--edge); } .chip2:hover { background: var(--gold); }
/* base 3D */
.b3g { grid-template-columns: 2.2fr 1fr; align-items: start; } @media (max-width: 900px) { .b3g { grid-template-columns: 1fr; } }
.b3d { width: 100%; height: 62vh; min-height: 340px; background: #87ceeb; position: relative; overflow: hidden; border: 3px solid var(--edge); } .b3d canvas { display: block; width: 100%; height: 100%; }
.b3t { position: absolute; display: none; background: rgba(0,0,0,.78); color: #fff; padding: 3px 8px; font: 12px var(--font-pix); pointer-events: none; z-index: 5; }
.dlist { max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.drow { display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; cursor: pointer; background: var(--slot); border: 3px solid var(--slot-edge); color: var(--ink); font: inherit; } .drow:hover { border-color: #c0392b; }

.b3wrap { position: relative; } .b3bar { display: none; }
.b3wrap.isfs { background: #000; width: 100vw; height: 100vh; } .b3wrap.fsx { position: fixed; inset: 0; z-index: 200; }
.b3wrap.isfs .b3d { height: 100vh; border: 0; } .b3wrap.isfs .b3bar { display: flex; gap: 8px; position: absolute; top: 10px; right: 10px; z-index: 6; }
.b3pad { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: space-between; padding: 0 18px; z-index: 6; pointer-events: none; } .b3pad[hidden] { display: none; }
.b3pad .pd, .b3pad .pv { display: grid; gap: 8px; pointer-events: auto; }
.b3pad .pd { grid-template-columns: repeat(3, 62px); grid-template-areas: ". w ." "a s d"; } .b3pad .pd [data-k=w] { grid-area: w; } .b3pad .pd [data-k=a] { grid-area: a; } .b3pad .pd [data-k=s] { grid-area: s; } .b3pad .pd [data-k=d] { grid-area: d; }
.b3pad .pv { grid-template-columns: 90px; }
.b3pad button { height: 58px; font: 700 20px var(--font-pix); color: #fff; background: rgba(40,40,40,.62); border: 3px solid rgba(255,255,255,.55); touch-action: none; user-select: none; } .b3pad button.on { background: var(--grass); }
.b3pad .pv button { height: 50px; font-size: 14px; }
@media (orientation: landscape) and (max-height: 520px) { .b3d { height: 78vh; min-height: 240px; } }

.b3s { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; } .b3s .panel { padding: 10px 6px; margin: 0; } @media (max-width: 560px) { .b3s .stat b { font-size: .95rem; } .b3s .stat span { font-size: .7rem; line-height: 1.2; display: block; } }
