/* =========================================================
 *  Mancing Mania — gaya UI hangat ala Harvest Moon
 *  Teks memakai Nunito (jelas dibaca), judul besar memakai font pixel.
 *  Semua ukuran teks pakai rem → opsi "Teks besar" memperbesar semuanya.
 * ========================================================= */
:root {
  --ink: #2e1a0c;
  --ink2: #55361c;
  --wood: #9a6332;
  --wood-d: #6b4220;
  --wood-l: #c8894a;
  --cream: #fff3d2;
  --cream-d: #ecd29a;
  --paper: #fffaee;
  --gold: #ffcf4a;
  --gold-d: #b87a0a;
  --green: #5cc04a;
  --red: #e0503a;
  --blue: #4a8ee0;
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --pixel: 'Pixelify Sans', 'Nunito', monospace;
  --safe-t: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}
html { font-size: 16px; }
html.big { font-size: 18.5px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #2b1d14;
  font-family: var(--font); font-weight: 700; color: var(--ink);
  touch-action: none; overscroll-behavior: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; -webkit-user-select: text; user-select: text; touch-action: auto; }
.hidden { display: none !important; }
#app { position: fixed; inset: 0; overflow: hidden; }
canvas#game { position: absolute; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; }
.coin { display: inline-block; width: 0.85em; height: 0.85em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4a8 0 22%, #ffd040 23% 60%, #d89a1a 61%); border: 2px solid #8a5a10; vertical-align: -0.1em; margin-right: 0.2em; }

/* ---------------- HUD ---------------- */
#hud-top { position: absolute; top: calc(var(--safe-t) + 8px); left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; z-index: 6; }
.plate { pointer-events: auto; background: var(--cream); border: 3px solid var(--ink); border-radius: 10px; box-shadow: inset 0 -3px 0 var(--cream-d), 0 3px 0 rgba(0, 0, 0, .35); padding: 4px 10px; }
#hud-player { min-width: 8.5rem; }
#hud-player .row { display: flex; justify-content: space-between; gap: 8px; font-weight: 900; font-size: 1rem; }
#hud-name { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hud-player .lvl { color: var(--ink2); }
.xpbar { height: 8px; background: #5a4030; border: 2px solid var(--ink); border-radius: 5px; margin-top: 3px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(#a8ff7a, #4fbf3a); transition: width .4s; }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.plate.coins { font-weight: 900; font-size: 1.15rem; }
.plate.small { padding: 2px 9px; font-weight: 800; font-size: 0.95rem; }
#btn-owner { background: linear-gradient(#ffe27a, var(--gold)); }
#hud-chips { position: absolute; top: calc(var(--safe-t) + 4rem); left: 8px; right: 7.5rem; display: flex; flex-wrap: wrap; gap: 4px; z-index: 6; }
.chip { background: rgba(35, 22, 12, .86); color: #fff; border: 2px solid rgba(255, 255, 255, .3); border-radius: 12px; padding: 2px 9px; font-size: 0.85rem; font-weight: 800; white-space: nowrap; }
.chip.gold { background: rgba(150, 100, 10, .92); }
.chip.buff { background: rgba(35, 105, 55, .92); }
.chip.blue { background: rgba(35, 75, 155, .92); }

#area-banner { position: absolute; top: 28%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; z-index: 7; color: #fff; text-shadow: 0 3px 0 var(--ink), 0 0 12px rgba(0, 0, 0, .6); white-space: nowrap; }
#area-banner small { display: block; font-size: 0.95rem; font-weight: 800; }
#area-banner b { font-family: var(--pixel); font-size: 2.1rem; }
#area-banner.show { animation: banner 3s ease forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* tombol lempar */
#cast-wrap { position: absolute; right: 12px; bottom: calc(var(--safe-b) + 5.2rem); display: flex; align-items: center; gap: 8px; z-index: 6; }
#btn-cast { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--ink); background: radial-gradient(circle at 40% 30%, #ffe88a, #ffc22e 55%, #e0961a); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .2), 0 5px 0 var(--ink), 0 8px 14px rgba(0, 0, 0, .4); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; touch-action: none; padding: 0; }
#btn-cast #cast-ic { font-size: 1.75rem; line-height: 1; }
#btn-cast #cast-tx { font-size: 0.95rem; margin-top: 2px; letter-spacing: .5px; }
#btn-cast:active, #btn-cast.reel { transform: translateY(3px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 2px 0 var(--ink); }
#btn-cast.dim { filter: saturate(.35) brightness(.85); }
#btn-cast.charge, #btn-cast.reel { background: radial-gradient(circle at 40% 30%, #c8ffb0, #6fdc5a 55%, #3a9a2a); }
#btn-cast.wait { background: radial-gradient(circle at 40% 30%, #d8ecff, #8ab8ec 55%, #4a7ac0); }
#btn-cast.alert { background: radial-gradient(circle at 40% 30%, #ffc0b0, #ff5a3a 55%, #b02010); color: #fff; animation: shake .15s infinite; }
@keyframes shake { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-2px, 1px) rotate(-3deg); } 75% { transform: translate(2px, -1px) rotate(3deg); } }
#btn-auto { border: 3px solid var(--ink); border-radius: 14px; background: var(--cream); padding: 7px 12px; font-weight: 900; font-size: 0.95rem; box-shadow: 0 3px 0 var(--ink); }
#btn-auto.on { background: #4a8ee0; color: #fff; }

/* menu bawah */
#menu { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 6px 6px calc(var(--safe-b) + 6px); background: linear-gradient(var(--wood-l), var(--wood) 30%, var(--wood-d)); border-top: 3px solid var(--ink); box-shadow: 0 -3px 0 rgba(0, 0, 0, .25); }
#menu button { position: relative; background: var(--cream); border: 3px solid var(--ink); border-radius: 10px; padding: 3px 0 3px; display: flex; flex-direction: column; align-items: center; box-shadow: inset 0 -3px 0 var(--cream-d); min-width: 0; }
#menu button i { font-style: normal; font-size: 1.3rem; line-height: 1.15; }
#menu button span { font-size: 0.78rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#menu button.active { background: var(--gold); }
#menu button:active { transform: translateY(2px); }
#menu.locked button { opacity: .5; }
#menu em { position: absolute; top: -10px; right: -4px; font-style: normal; font-size: 0.72rem; font-weight: 900; background: var(--ink); color: #fff; border-radius: 8px; padding: 0 5px; }
#menu em:empty { display: none; }
#menu em.warn { background: #c87a00; }
#menu em.full { background: var(--red); animation: pulse 1s infinite; }
#menu em.dot { width: 13px; height: 13px; padding: 0; background: var(--red); border: 2px solid #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.2); } }

/* elemen yang menempel di dunia */
#anchors { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.float { position: absolute; left: 0; top: 0; font-family: var(--pixel); font-weight: 700; font-size: 1.25rem; color: #fff; text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); white-space: nowrap; }
.float.perfect { color: #8fff7a; font-size: 1.5rem; }
.float.gold { color: var(--gold); }
#bite { position: absolute; left: 0; top: 0; font-family: var(--pixel); font-size: 2.3rem; font-weight: 700; color: #fff; text-shadow: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink); animation: bounce .3s infinite alternate; }
#bite.r3, #bite.r4 { color: #ffb52e; }
#bite.r5 { color: #ff4f6d; }
#bite.r6 { animation: bounce .2s infinite alternate, rainbow 1s linear infinite; }
@keyframes bounce { to { margin-top: -6px; } }
@keyframes rainbow { 0% { color: #ff5050; } 20% { color: #ffd040; } 40% { color: #60ff80; } 60% { color: #50c0ff; } 80% { color: #c070ff; } 100% { color: #ff5050; } }

/* toast */
#toasts { position: absolute; top: calc(var(--safe-t) + 6.2rem); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92%; pointer-events: none; }
.toast { background: rgba(30, 18, 10, .95); color: #fff; border: 2px solid rgba(255, 255, 255, .35); border-radius: 12px; padding: 7px 14px; font-size: 0.95rem; font-weight: 800; line-height: 1.3; text-align: center; animation: tin .25s ease; transition: opacity .35s, transform .35s; max-width: 100%; white-space: pre-line; }
.toast.gold { border-color: var(--gold); color: #ffe9a0; }
.toast.red { border-color: #ff7a6a; color: #ffd8d0; }
.toast.blue { border-color: #8ac0ff; }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------- tombol umum ---------------- */
.btn { background: var(--cream); border: 3px solid var(--ink); border-radius: 10px; padding: 8px 14px; font-weight: 900; font-size: 1rem; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 3px 0 var(--ink); white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { padding: 5px 10px; font-size: 0.88rem; }
.btn.wide { display: block; width: 100%; margin: 8px 0; }
.btn.gold { background: linear-gradient(#ffe27a, var(--gold)); }
.btn.green { background: linear-gradient(#a8f08a, var(--green)); }
.btn.red { background: linear-gradient(#ffa090, var(--red)); color: #fff; }
.btn.poor { filter: grayscale(.6); opacity: .8; }

/* input */
.inp { width: 100%; background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 1rem; font-weight: 700; color: var(--ink); outline: none; }
.inp:focus { border-color: var(--gold-d); box-shadow: 0 0 0 3px rgba(255, 207, 74, .5); }
.inp::placeholder { color: #9a8670; font-weight: 600; }
textarea.inp { resize: vertical; font-size: 0.85rem; word-break: break-all; }
.inp.mono, textarea.inp.code { font-family: ui-monospace, Consolas, monospace; }
select.inp { padding: 7px 8px; }

/* ---------------- panel ---------------- */
#shade { position: absolute; inset: 0; background: rgba(20, 10, 5, .5); z-index: 18; }
#panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: 86%; display: flex; flex-direction: column; background: var(--paper); border-top: 4px solid var(--ink); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 0 var(--wood), 0 -10px 0 var(--ink); animation: up .22s ease; padding-bottom: var(--safe-b); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
#panel header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
#panel h2 { margin: 0; font-size: 1.35rem; font-weight: 900; }
#panel h2 small { font-size: 0.9rem; color: var(--ink2); }
#panel .x { width: 38px; height: 38px; border: 3px solid var(--ink); border-radius: 50%; background: var(--red); color: #fff; font-weight: 900; font-size: 1.05rem; box-shadow: 0 2px 0 var(--ink); flex: 0 0 auto; }
.tabs { display: flex; gap: 4px; padding: 0 10px 6px; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; border: 3px solid var(--ink); border-radius: 10px 10px 4px 4px; background: var(--cream-d); padding: 4px 12px; font-weight: 900; font-size: 0.92rem; }
.tabs button.on { background: var(--gold); }
.scroll { flex: 1; overflow-y: auto; padding: 4px 10px 16px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
#panel footer { padding: 4px 10px 8px; border-top: 3px dashed var(--cream-d); }
.foot-info { text-align: center; padding: 6px; font-size: 1rem; }
h4 { margin: 16px 0 6px; font-size: 1.05rem; font-weight: 900; }
h4 small { color: var(--ink2); font-weight: 700; font-size: 0.82rem; }
.hint { color: var(--ink2); font-size: 0.88rem; font-weight: 700; text-align: center; line-height: 1.35; }
.hint.left { text-align: left; }
.empty { text-align: center; padding: 40px 0; font-size: 2.6rem; }
.empty p { font-size: 1.05rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.95rem; }

/* gambar ikan */
.fimg { width: 72px; height: 48px; image-rendering: pixelated; image-rendering: crisp-edges; display: block; margin: 0 auto; }
.fimg.big { width: 144px; height: 96px; }
.fimg.glow { filter: drop-shadow(0 0 4px var(--glow)); }
.fimg.sil { filter: brightness(0) opacity(.3) !important; animation: none !important; }
.fimg.fm-shiny { animation: shine 1.4s infinite; }
.fimg.fm-pelangi { animation: hue 2s linear infinite; }
.fimg.fm-hantu { animation: ghost 2s ease-in-out infinite; }
.fimg.fm-galaksi, .fimg.fm-kristal { filter: drop-shadow(0 0 4px #b0a0ff); }
.fimg.fm-emas { filter: drop-shadow(0 0 4px #ffd040); }
.fimg.fm-magma { filter: drop-shadow(0 0 4px #ff6020); }
@keyframes shine { 50% { filter: brightness(1.4) drop-shadow(0 0 5px #fff6a0); } }
@keyframes hue { to { filter: hue-rotate(360deg) drop-shadow(0 0 4px #fff); } }
@keyframes ghost { 50% { opacity: .55; } }

/* kartu ikan */
.r0 { --rc: #9a9a9a; } .r1 { --rc: #4cb83a; } .r2 { --rc: #2f88e0; } .r3 { --rc: #a04ee0; } .r4 { --rc: #e09010; } .r5 { --rc: #e83050; } .r6 { --rc: #14c8aa; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr)); gap: 8px; }
.card { position: relative; background: #fff; border: 3px solid var(--rc); border-radius: 12px; padding: 6px 4px 6px; text-align: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); min-width: 0; }
.card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.86rem; font-weight: 900; line-height: 1.15; min-height: 2.3em; margin-top: 3px; word-break: break-word; }
.card small { display: block; font-size: 0.8rem; color: var(--ink2); }
.card .val { display: block; font-size: 0.86rem; font-weight: 900; }
.card .fav { position: absolute; top: 1px; left: 5px; color: #f0a020; font-style: normal; font-size: 1.05rem; text-shadow: 0 1px 0 var(--ink); }
.card .mb { position: absolute; top: 3px; right: 3px; font-style: normal; }
.card.unk { background: #f4ecd8; }
.card.secret { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #ff5050, #ffd040, #60ff80, #50c0ff, #c070ff, #ff5050) border-box; background-size: 100% 100%, 300% 100%; animation: rbmove 3s linear infinite; }
.card.secret.unk { background: linear-gradient(#20202a, #20202a) padding-box, linear-gradient(90deg, #ff5050, #ffd040, #60ff80, #50c0ff, #c070ff, #ff5050) border-box; background-size: 100% 100%, 300% 100%; color: #fff; }
.card.secret.unk small { color: #8affe8; }
@keyframes rbmove { to { background-position: 0 0, 300% 0; } }
.rar { display: inline-block; padding: 1px 9px; border-radius: 9px; color: #fff; font-weight: 900; font-size: 0.85rem; background: var(--rc); text-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
.rar.r6 { background: linear-gradient(90deg, #e04040, #e0a020, #30c060, #3090e0, #9050e0); }
.mut, .mb { display: inline-block; padding: 1px 8px; border-radius: 9px; font-weight: 900; font-size: 0.82rem; background: #eee; color: var(--ink); border: 2px solid var(--ink); }
.mb { font-size: 0.68rem; padding: 0 5px; border-width: 1px; }
.m-shiny { background: #fff6a0; } .m-albino { background: #ffe0e8; } .m-raksasa { background: #ffb070; } .m-emas { background: #ffd040; }
.m-hantu { background: #c8dcff; } .m-kristal { background: #a8f4ff; } .m-magma { background: #ff7a40; color: #fff; } .m-galaksi { background: #6a48d0; color: #fff; }
.m-pelangi { background: linear-gradient(90deg, #ff8080, #ffe080, #80ff90, #80c0ff, #d090ff); }

/* daftar item toko */
.item { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px; margin-bottom: 8px; }
.item.eq { border-color: var(--green); background: #f2fff0; }
.item .ic { width: 48px; height: 48px; image-rendering: pixelated; flex: 0 0 48px; }
.item .ic.emo { font-size: 2rem; text-align: center; line-height: 48px; }
.item .info { flex: 1; min-width: 0; }
.item .info b { display: block; font-size: 1.02rem; font-weight: 900; }
.item .info b em { color: var(--gold-d); font-style: normal; }
.item .info small { display: block; font-size: 0.86rem; color: var(--ink2); line-height: 1.3; }
.stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.stats span { font-size: 0.8rem; font-weight: 800; background: var(--cream); border: 1px solid var(--cream-d); border-radius: 7px; padding: 1px 6px; white-space: nowrap; }
.item .act { flex: 0 0 auto; }
.upcard { text-align: center; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 10px; }
.upcard h3 { margin: 4px 0; font-size: 1.2rem; }
.upcard h3 em { color: var(--gold-d); font-style: normal; }
.ic.big { width: 72px; height: 72px; image-rendering: pixelated; }
.stars i { font-style: normal; color: #d8c8a8; font-size: 1.1rem; }
.stars i.on { color: #f0a020; text-shadow: 0 1px 0 var(--ink); }
table.cmp { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 0.95rem; }
table.cmp td { padding: 5px 4px; border-bottom: 2px dashed var(--cream-d); text-align: left; }
table.cmp td b { color: #1e7a1e; }
.enbox { background: #f6eeff; border: 2px solid #c8a8f0; border-radius: 10px; padding: 8px; margin-top: 8px; font-size: 0.92rem; line-height: 1.4; }
.list .row { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 2px dashed var(--cream-d); font-size: 0.95rem; }
.list .row b { flex: 0 0 auto; }
.list .row span { flex: 1; color: var(--ink2); }
.list .row em { font-style: normal; font-weight: 900; }
.stats-list .row span { color: var(--ink); }

/* index */
.ixhead { background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 7px 10px; margin-bottom: 8px; font-size: 0.95rem; line-height: 1.45; }
.ixhead .lock { color: var(--red); font-weight: 900; margin-top: 3px; }
.ixhead small { color: var(--ink2); }

/* misi */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.day { background: #fff; border: 2px solid var(--cream-d); border-radius: 8px; text-align: center; padding: 3px 0; font-size: 0.7rem; }
.day b { display: block; font-size: 0.72rem; font-weight: 900; }
.day.got { background: #d8f4c8; border-color: var(--green); }
.day.today { border-color: var(--gold-d); background: #fff2b8; animation: pulse 1s infinite; }
.quest { position: relative; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px 8px 8px 10px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; align-items: center; }
.quest .qt { font-weight: 900; font-size: 1rem; grid-column: 1; }
.quest .qbar { grid-column: 1; position: relative; height: 18px; background: #e8dcc0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.quest .qbar i { display: block; height: 100%; background: linear-gradient(#a8ff7a, #4fbf3a); }
.quest .qbar span { position: absolute; inset: 0; text-align: center; font-size: 0.78rem; line-height: 14px; font-weight: 900; }
.quest .qr { grid-column: 1; font-size: 0.88rem; color: var(--ink2); }
.quest .btn { grid-column: 2; grid-row: 1 / span 3; }
.quest.done { border-color: var(--gold-d); }
.quest.claimed { opacity: .6; }

/* peta */
.island { display: flex; align-items: center; gap: 8px; border: 3px solid var(--ink); border-radius: 12px; padding: 10px; margin-bottom: 8px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 0 6px rgba(0, 0, 0, .5); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.island .info { flex: 1; min-width: 0; }
.island b { font-size: 1.2rem; font-weight: 900; }
.island small { display: block; font-size: 0.88rem; line-height: 1.3; }
.island .stats span { background: rgba(0, 0, 0, .45); color: #fff; border-color: transparent; }
.island.locked { filter: grayscale(.55) brightness(.85); }
.island.here { outline: 3px solid var(--gold); outline-offset: 2px; }
.island .btn { text-shadow: none; color: var(--ink); }
.th-desa { background: linear-gradient(135deg, #5aa83a, #2a70c8); }
.th-hutan { background: linear-gradient(135deg, #1e6a2c, #1e5a6a); }
.th-karang { background: linear-gradient(135deg, #c89a40, #0a88a0); }
.th-kristal { background: linear-gradient(135deg, #3a3050, #2a70b0); }
.th-kawah { background: linear-gradient(135deg, #3e302e, #c03008); }
.th-abyss { background: linear-gradient(135deg, #10182a, #1a2a60); }
.th-langit { background: linear-gradient(135deg, #d070a0, #5a8ad0); }

/* setelan */
.row.toggle span { color: var(--ink) !important; }
.row.toggle small { color: var(--ink2); font-size: 0.8rem; }
.sw { width: 54px; height: 30px; border-radius: 15px; border: 3px solid var(--ink); background: #c8b898; position: relative; padding: 0; flex: 0 0 auto; }
.sw i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: left .15s; }
.sw.on { background: var(--green); }
.sw.on i { left: 26px; }
.about { text-align: center; margin: 14px 0; line-height: 1.4; }
.redeem { display: flex; gap: 6px; align-items: center; }
.redeem .inp { flex: 1; min-width: 0; }
.idbox { background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px 10px; margin-top: 10px; font-size: 0.95rem; line-height: 1.5; }
.idbox small { color: var(--ink2); }
.giftbox { font-size: 3.2rem; animation: bounce .4s infinite alternate; }
.giftlist div { font-size: 1.15rem; font-weight: 900; padding: 3px 0; }

/* ---------------- owner ---------------- */
.own-note { background: #fff6d0; border: 2px solid var(--gold-d); border-radius: 10px; padding: 8px 10px; font-size: 0.9rem; line-height: 1.4; margin-bottom: 4px; }
.own-sec { background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 4px 10px 10px; margin-top: 10px; }
.own-sec h4 { margin: 8px 0 6px; }
.own-sec h4 .ok { color: #1e8a2a; font-size: 0.85rem; }
.own-sec h4 .bad { color: var(--red); font-size: 0.85rem; }
.own-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.own-row .inp { flex: 1 1 9rem; min-width: 0; }
.own-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 6px; }
.own-grid .btn { white-space: normal; line-height: 1.2; }
.own-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.fl { display: block; font-size: 0.85rem; font-weight: 900; margin: 8px 0 3px; }
.fl small { color: var(--ink2); font-weight: 700; }
.gift-out { border-color: var(--green); background: #f4fff0; }
.gift-desc { font-size: 0.95rem; line-height: 1.4; margin: 4px 0 8px; }
.gift-out textarea { margin-bottom: 8px; }
.console { background: #1e1610; color: #f4e6c8; border: 3px solid var(--ink); border-radius: 10px; padding: 8px 10px; height: 13rem; overflow-y: auto; font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; font-weight: 600; line-height: 1.4; touch-action: pan-y; -webkit-user-select: text; user-select: text; }
.console .lg-cmd { color: #ffd04a; margin-top: 6px; }
.console .lg-out { color: #e8f8d8; word-break: break-word; }
.cmd-list .cmd { background: #fff; border: 2px solid var(--cream-d); border-radius: 9px; padding: 6px 8px; margin-bottom: 5px; font-size: 0.9rem; cursor: pointer; }
.cmd-list .cmd b { color: #8a4a00; }
.cmd-list .cmd code { font-size: 0.78rem; color: var(--ink2); }
.cmd-list .cmd span { display: block; font-size: 0.82rem; color: var(--ink2); }
.cmd-list .cmd:active { background: #fff2b8; }

/* ---------------- dialog NPC ---------------- */
#dialog { position: absolute; left: 8px; right: 8px; bottom: calc(var(--safe-b) + 5.3rem); z-index: 25; }
.dlg-box { position: relative; display: flex; gap: 10px; background: var(--paper); border: 4px solid var(--ink); border-radius: 12px; box-shadow: inset 0 0 0 3px var(--cream-d), 0 5px 0 rgba(0, 0, 0, .35); padding: 10px 12px 14px; min-height: 104px; animation: up .2s ease; }
#dlg-face { width: 64px; height: 48px; image-rendering: pixelated; flex: 0 0 64px; background: #cfe8ff; border: 3px solid var(--ink); border-radius: 8px; }
.dlg-main { flex: 1; min-width: 0; }
#dlg-name { display: inline-block; background: var(--wood); color: #fff; font-weight: 900; padding: 1px 10px; border-radius: 8px; border: 2px solid var(--ink); margin-bottom: 5px; font-size: 0.92rem; }
#dlg-name:empty { display: none; }
#dlg-text { font-size: 1.08rem; font-weight: 700; line-height: 1.42; min-height: 2.8em; }
#dlg-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#dlg-next { position: absolute; right: 12px; bottom: 4px; animation: bounce .4s infinite alternate; font-size: 0.85rem; }

/* ---------------- modal ---------------- */
#modal { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(20, 10, 5, .55); padding: 16px; }
.modal-box { background: var(--paper); border: 4px solid var(--ink); border-radius: 14px; box-shadow: inset 0 0 0 3px var(--cream-d), 0 6px 0 rgba(0, 0, 0, .35); padding: 16px; width: 100%; max-width: 360px; max-height: 86%; overflow-y: auto; text-align: center; animation: pop .2s ease; touch-action: pan-y; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.modal-box h3 { margin: 4px 0 8px; font-size: 1.3rem; font-weight: 900; }
.modal-box p { margin: 6px 0; font-size: 1rem; line-height: 1.4; }
.modal-box .big { font-size: 1.5rem; font-weight: 900; }
#modal-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
#modal-btns:empty { display: none; }
.fd h3 { margin: 6px 0 4px; }
.fd .muts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; }
.help { text-align: left; font-size: 0.95rem; line-height: 1.45; }
.help p { margin: 7px 0; }
.lvlup small { display: block; font-size: 1.1rem; color: var(--gold-d); font-weight: 900; }
.lvlup b { font-family: var(--pixel); font-size: 3rem; color: var(--ink); text-shadow: 0 3px 0 var(--gold); }
.enroll small { display: block; color: var(--ink2); }
.enroll b { display: block; font-size: 1.7rem; font-weight: 900; margin: 10px 0; color: #6a2ac0; }
.enroll b.rare { animation: rainbow 1s linear infinite; }

/* ---------------- popup tangkapan ---------------- */
#catch { position: absolute; inset: 0; z-index: 28; display: flex; align-items: center; justify-content: center; background: rgba(20, 10, 5, .6); overflow: hidden; padding-bottom: 60px; }
#catch .rays { position: absolute; left: 50%; top: 45%; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: repeating-conic-gradient(from 0deg, rgba(255, 240, 180, .25) 0 10deg, transparent 10deg 20deg); animation: spin 10s linear infinite; opacity: .8; }
#catch.secret .rays { background: repeating-conic-gradient(from 0deg, #ff505088 0 8deg, #ffd04088 8deg 16deg, #60ff8088 16deg 24deg, #50c0ff88 24deg 32deg, #c070ff88 32deg 40deg, transparent 40deg 48deg); animation-duration: 4s; }
@keyframes spin { to { transform: rotate(360deg); } }
.catch-card { position: relative; background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; box-shadow: inset 0 0 0 4px var(--rc), 0 6px 0 rgba(0, 0, 0, .4); padding: 14px 14px 12px; width: 90%; max-width: 340px; text-align: center; animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.c-secret { font-family: var(--pixel); font-size: 1.5rem; font-weight: 700; animation: rainbow 1s linear infinite; text-shadow: 0 2px 0 var(--ink); margin-bottom: 2px; }
.c-new { position: absolute; top: -14px; right: -10px; background: var(--red); color: #fff; font-weight: 900; padding: 3px 10px; border: 3px solid var(--ink); border-radius: 10px; transform: rotate(10deg); animation: pulse 1s infinite; }
.c-rar { display: inline-block; background: var(--rc); color: #fff; font-weight: 900; font-size: 1rem; padding: 2px 14px; border-radius: 10px; border: 2px solid var(--ink); text-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
#catch.secret .c-rar { background: linear-gradient(90deg, #e04040, #e0a020, #30c060, #3090e0, #9050e0); }
.c-img { margin: 8px 0 2px; }
.c-img .fimg.big { width: 192px; height: 128px; }
.c-name { font-size: 1.6rem; font-weight: 900; line-height: 1.15; }
.c-mut { margin: 4px 0; }
.c-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.c-stats span { background: var(--cream); border: 2px solid var(--cream-d); border-radius: 9px; padding: 3px 9px; font-weight: 900; font-size: 0.95rem; }
.c-extra { font-size: 0.92rem; background: #fff2b8; border-radius: 9px; padding: 5px; margin: 4px 0; }
.c-extra.red { background: #ffd8d0; }
.c-btns { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }

/* ---------------- transisi & loading ---------------- */
#fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 50; }
#fade.on { opacity: 1; pointer-events: auto; }
#loading { position: absolute; inset: 0; z-index: 60; background: radial-gradient(circle at 50% 40%, #6b4a2e, #2b1d14); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; transition: opacity .5s; text-align: center; padding: 20px; }
#loading.out { opacity: 0; pointer-events: none; }
#loading .logo { font-family: var(--pixel); font-size: 2.6rem; font-weight: 700; color: var(--gold); text-shadow: 0 4px 0 var(--ink), 0 0 20px rgba(255, 200, 80, .4); line-height: 1; }
#loading .logo small { display: block; font-family: var(--font); font-size: 1rem; font-weight: 800; color: #fff; text-shadow: 0 2px 0 var(--ink); margin-top: 8px; }
#loading .fish { font-size: 3rem; animation: bounce .5s infinite alternate; margin-bottom: 10px; }
#loading .bar { width: 200px; height: 14px; border: 3px solid var(--ink); border-radius: 8px; background: #3a2a1a; margin-top: 22px; overflow: hidden; }
#loading .bar i { display: block; height: 100%; width: 0; background: linear-gradient(#ffe27a, var(--gold)); transition: width .3s; }
#loading p { font-size: 0.95rem; opacity: .9; }
#loading .err { color: #ffb0a0; font-size: 0.85rem; max-width: 320px; white-space: pre-wrap; text-align: left; }

/* ---------------- ikon pancingan berpendar ---------------- */
.ic-wrap { position: relative; flex: 0 0 52px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.ic-wrap .ic { position: relative; z-index: 1; width: 52px; height: 52px; flex: none; image-rendering: pixelated; }
.ic-wrap.big { width: 78px; height: 78px; margin: 0 auto; }
.ic-wrap.big .ic { width: 78px; height: 78px; }
.ic-wrap.fx::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: radial-gradient(circle, var(--aura) 0%, transparent 68%); opacity: .6; animation: auraPulse 1.6s ease-in-out infinite; }
.ic-wrap.fx .ic { filter: drop-shadow(0 0 3px var(--aura)); }
.ic-wrap.fx-rb::before { background: conic-gradient(#ff5050, #ffd040, #60ff80, #50c0ff, #c070ff, #ff5050); filter: blur(6px); opacity: .7; animation: auraPulse 1.6s ease-in-out infinite, spin 3s linear infinite; }
.ic-wrap.fx-rb .ic { filter: drop-shadow(0 0 3px #ffffff); }
@keyframes auraPulse { 0%, 100% { opacity: .45; transform: scale(.92); } 50% { opacity: .8; transform: scale(1.08); } }
.fxtag { display: inline-block; margin-top: 4px; font-size: 0.8rem; font-weight: 900; color: #fff; background: #2e1a0c; border: 2px solid var(--aura, #ffd040); box-shadow: 0 0 6px var(--aura, #ffd040); border-radius: 9px; padding: 1px 8px; }
.fxtag.rb { border-color: #ff60c0; animation: rainbow 1.5s linear infinite; }

/* ---------------- peluang & banner ikan langka ---------------- */
.card .odds { display: block; font-size: 0.74rem; font-weight: 900; color: #6a3ab0; }
.card.secret.unk .odds { color: #ffd86a; }
.oddsbox { background: #f3ecff; border: 2px solid #c8a8f0; border-radius: 10px; padding: 6px 8px; margin: 8px 0; font-size: 0.92rem; line-height: 1.5; text-align: left; }
.oddsbox small { color: var(--ink2); }
.c-odds { display: inline-block; margin: 4px 0 0; padding: 2px 10px; border-radius: 10px; background: #2e1a0c; color: #ffe27a; font-weight: 900; font-size: 0.95rem; }
#catch.secret .c-odds { animation: rainbow 1.2s linear infinite; }
#rare-banner { position: absolute; top: calc(var(--safe-t) + 7.6rem); left: 50%; transform: translateX(-50%); z-index: 7; pointer-events: none; text-align: center; white-space: nowrap; animation: rareIn .45s cubic-bezier(.3, 1.6, .5, 1); }
#rare-banner b { display: block; font-family: var(--pixel); font-size: 2rem; color: #fff; text-shadow: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 0 18px currentColor; animation: rarePulse .6s ease-in-out infinite alternate; }
#rare-banner small { display: inline-block; margin-top: 4px; font-size: 0.9rem; font-weight: 900; color: #fff; background: rgba(20, 10, 5, .75); padding: 2px 10px; border-radius: 10px; }
#rare-banner.r4 b { color: #ffc23a; }
#rare-banner.r5 b { color: #ff4f6d; }
#rare-banner.r6 b { animation: rarePulse .4s ease-in-out infinite alternate, rainbow 1s linear infinite; }
@keyframes rareIn { from { transform: translateX(-50%) scale(2.2); opacity: 0; } }
@keyframes rarePulse { to { transform: scale(1.08); } }

/* ---------------- mode tap-tap ---------------- */
#tap-hint { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 11.5rem); transform: translateX(-50%); z-index: 7; pointer-events: none; font-family: var(--pixel); font-size: 1.5rem; font-weight: 700; color: #fff; text-shadow: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink); animation: tapHint .35s ease-in-out infinite alternate; white-space: nowrap; }
@keyframes tapHint { to { transform: translateX(-50%) scale(1.12); } }
#btn-cast.tap { animation: tapBtn .3s ease-in-out infinite alternate; }
@keyframes tapBtn { to { transform: scale(1.06); } }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode { text-align: left; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px; line-height: 1.3; }
.mode b { display: block; font-size: 1rem; }
.mode small { display: block; font-size: 0.8rem; color: var(--ink2); font-weight: 700; }
.mode.on { border-color: var(--green); background: #f2fff0; box-shadow: 0 0 0 2px var(--green) inset; }

/* ---------------- adegan pengungkapan ikan langka ---------------- */
#reveal { position: absolute; inset: 0; z-index: 29; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding-bottom: 60px; }
#reveal .rv-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(20, 10, 30, .55), rgba(0, 0, 0, .94)); }
#reveal .rv-rays { position: absolute; left: 50%; top: 45%; width: 1300px; height: 1300px; margin: -650px 0 0 -650px; background: repeating-conic-gradient(var(--rc) 0 7deg, transparent 7deg 18deg); opacity: .18; animation: spin 2.4s linear infinite; transition: opacity .3s; }
#reveal.secret .rv-rays { background: repeating-conic-gradient(#ff5050 0 6deg, transparent 6deg 12deg, #ffd040 12deg 18deg, transparent 18deg 24deg, #60ff80 24deg 30deg, transparent 30deg 36deg, #50c0ff 36deg 42deg, transparent 42deg 48deg, #c070ff 48deg 54deg, transparent 54deg 60deg); }
#reveal.s2 .rv-rays { opacity: .6; animation-duration: 7s; }
#reveal .rv-q { position: absolute; top: 24%; font-family: var(--pixel); font-size: 3.4rem; color: #fff; text-shadow: 0 0 20px var(--rc), 0 4px 0 var(--ink); animation: rarePulse .35s ease-in-out infinite alternate; z-index: 3; }
#reveal.s2 .rv-q { display: none; }
.rv-fish { position: relative; z-index: 2; }
.fimg.huge { width: 240px; height: 160px; }
#reveal.s1 .rv-fish .fimg { filter: brightness(0) drop-shadow(0 0 8px var(--rc)) !important; animation: rvSwing .7s ease-in-out infinite !important; }
@keyframes rvSwing { 0%, 100% { transform: scale(.82) rotate(-8deg); } 50% { transform: scale(1) rotate(8deg); } }
#reveal.s2 .rv-fish .fimg { animation: rvPop .6s cubic-bezier(.2, 1.8, .4, 1), rvFloat 1.6s .6s ease-in-out infinite; filter: drop-shadow(0 0 10px var(--rc)) drop-shadow(0 0 26px var(--rc)); }
@keyframes rvPop { from { transform: scale(2.6) rotate(-10deg); } }
@keyframes rvFloat { 50% { transform: translateY(-9px); } }
.rv-title { position: relative; z-index: 3; text-align: center; opacity: 0; margin-top: 6px; }
.rv-title b { display: block; font-family: var(--pixel); font-size: 3.1rem; line-height: 1; color: var(--rc); text-shadow: 0 4px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 -4px 0 var(--ink), 0 0 30px var(--rc); }
.rv-title small { display: block; margin-top: 6px; font-size: 1.4rem; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(0, 0, 0, .8); }
#reveal.s2 .rv-title { opacity: 1; animation: rvSlam .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rvSlam { from { transform: scale(3.2); opacity: 0; } }
#reveal.secret.s2 .rv-title b { animation: rainbow .8s linear infinite; }
.rv-odds { position: relative; z-index: 3; margin-top: 10px; padding: 4px 14px; border-radius: 12px; background: rgba(0, 0, 0, .65); border: 2px solid var(--rc); color: #ffe27a; font-weight: 900; font-size: 1.05rem; opacity: 0; }
.rv-odds:empty { display: none; }
#reveal.s2 .rv-odds { opacity: 1; transition: opacity .4s .35s; }
.rv-ring { position: absolute; left: 50%; top: 45%; width: 24px; height: 24px; margin: -12px; border-radius: 50%; border: 5px solid var(--rc); opacity: 0; z-index: 1; }
#reveal.s2 .rv-ring { animation: rvRing .9s ease-out forwards; }
#reveal.s2 .rv-ring.r2 { animation-delay: .15s; }
#reveal.s2 .rv-ring.r3 { animation-delay: .3s; border-color: #fff; }
@keyframes rvRing { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(42); } }
.rv-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 6; }
#reveal.s2 .rv-flash { animation: rvFlash .7s ease-out; }
@keyframes rvFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.rv-conf { position: absolute; left: 50%; top: 45%; z-index: 4; }
.rv-conf i { position: absolute; width: var(--w); height: calc(var(--w) * 1.6); background: var(--c); border-radius: 1px; opacity: 0; }
#reveal.s2 .rv-conf i { animation: conf 1.9s var(--del) cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes conf { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 240px)) rotate(var(--rot)); } }
.rv-skip { position: absolute; bottom: calc(var(--safe-b) + 22px); color: rgba(255, 255, 255, .75); font-weight: 800; font-size: .85rem; z-index: 5; }
#app.shake { animation: appShake .55s; }
@keyframes appShake { 0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-9px, 5px); } 20% { transform: translate(8px, -6px); } 30% { transform: translate(-7px, -3px); } 40% { transform: translate(6px, 5px); } 55% { transform: translate(-4px, 2px); } 70% { transform: translate(3px, -3px); } 85% { transform: translate(-2px, 1px); } }
/* kartu hasil versi "wah" */
#catch.wow .catch-card { animation: pop .3s cubic-bezier(.3, 1.6, .5, 1), wowGlow .9s ease-in-out infinite alternate; }
@keyframes wowGlow { to { box-shadow: inset 0 0 0 4px var(--rc), 0 6px 0 rgba(0, 0, 0, .4), 0 0 34px 8px var(--rc); } }
#catch.secret.wow .catch-card { animation: pop .3s cubic-bezier(.3, 1.6, .5, 1), wowGlow .9s ease-in-out infinite alternate, hueGlow 3s linear infinite; }
@keyframes hueGlow { to { filter: hue-rotate(360deg); } }
.c-shine { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; pointer-events: none; }
.c-shine::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shine2 2.2s ease-in-out infinite; }
@keyframes shine2 { 0% { left: -60%; } 60%, 100% { left: 130%; } }
#catch.wow .c-img .fimg { animation: rvFloat 1.6s ease-in-out infinite; }
/* ikon pancingan lebih besar & detail */
.ic-wrap { flex: 0 0 68px; width: 68px; height: 68px; }
.ic-wrap .ic { width: 68px; height: 68px; }
.ic-wrap.big, .ic-wrap.big .ic { width: 102px; height: 102px; }

/* ---------------- analog di layar ---------------- */
#stick { position: absolute; left: 14px; bottom: calc(var(--safe-b) + 5.4rem); z-index: 6; touch-action: none; }
.stick-base { position: relative; width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 243, 210, .35) 0 45%, rgba(43, 29, 20, .45) 46% 100%); border: 4px solid rgba(46, 26, 12, .85); box-shadow: inset 0 0 0 3px rgba(255, 243, 210, .55), 0 4px 0 rgba(0, 0, 0, .35); touch-action: none; display: flex; align-items: center; justify-content: center; }
.stick-base::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; border: 2px dashed rgba(255, 243, 210, .45); }
.stick-knob { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff8dc, #ffcf4a 55%, #c88a10); border: 4px solid var(--ink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), 0 3px 0 var(--ink); pointer-events: none; transition: transform .08s; }
#stick.active .stick-knob { transition: none; }
.alpha-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px 10px; }
.alpha-ctl { flex: 1; min-width: 0; }
.alpha-ctl label { display: block; font-size: 0.95rem; font-weight: 900; }
.alpha-ctl small { display: block; font-size: 0.8rem; color: var(--ink2); }
.range { width: 100%; margin: 8px 0 4px; accent-color: #c88a10; touch-action: none; height: 28px; }
.stick-prev { flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 243, 210, .35) 0 45%, rgba(43, 29, 20, .5) 46% 100%); border: 3px solid rgba(46, 26, 12, .85); display: flex; align-items: center; justify-content: center; }
.stick-prev i { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff8dc, #ffcf4a 55%, #c88a10); border: 3px solid var(--ink); }

/* ---------------- label tempat di dunia ---------------- */
.place { position: absolute; left: 0; top: 0; background: rgba(30, 18, 10, .82); color: #fff; border: 2px solid rgba(255, 220, 140, .85); border-radius: 10px; padding: 1px 8px; font-size: 0.78rem; font-weight: 900; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
/* ---------------- tempat penjualan ---------------- */
.sellhead { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.sell-npc { font-size: 2.2rem; }
.sellhead b { display: block; font-size: 1.05rem; }
.sellhead small { color: var(--ink2); font-size: 0.85rem; }
.sellbtns { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
/* ---------------- gacha ---------------- */
.gacha-card { text-align: center; background: linear-gradient(#fff8e6, #fff); border: 3px solid var(--gold-d); border-radius: 14px; padding: 12px; }
.gacha-box { font-size: 4rem; animation: bounce .5s infinite alternate; }
.gacha-card h3 { margin: 4px 0; font-size: 1.3rem; }
.gacha-card p { margin: 6px 0; font-size: 0.92rem; }
.gacha-btns { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
.gacha-btns .btn { white-space: normal; line-height: 1.25; min-width: 8rem; }
.gacha-odds .row b.rar { flex: 0 0 6.2rem; text-align: center; }
.gacha-odds .row span { font-size: 0.82rem; }
.freegacha { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: linear-gradient(90deg, #fff2b8, #ffe0f0); border: 3px solid var(--gold-d); border-radius: 12px; padding: 8px 10px; font-weight: 900; }
#gacha { position: absolute; inset: 0; z-index: 31; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 12px 70px; overflow: hidden; --rc: #ffd040; }
#gacha.r0 { --rc: #c0c0c0; } #gacha.r1 { --rc: #5cc84a; } #gacha.r2 { --rc: #3f98f0; } #gacha.r3 { --rc: #b05ef0; } #gacha.r4 { --rc: #f0a020; } #gacha.r5 { --rc: #ff4f6d; }
#gacha .g-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(40, 20, 60, .7), rgba(0, 0, 0, .93)); }
#gacha .g-rays { position: absolute; left: 50%; top: 42%; width: 1200px; height: 1200px; margin: -600px 0 0 -600px; background: repeating-conic-gradient(var(--rc) 0 7deg, transparent 7deg 18deg); opacity: .15; animation: spin 5s linear infinite; }
#gacha.g2 .g-rays { opacity: .45; }
#gacha .g-box { position: relative; font-size: 6.5rem; filter: drop-shadow(0 0 22px var(--rc)); animation: gShake .14s infinite; }
@keyframes gShake { 0%, 100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(7deg) scale(1.1); } }
#gacha.g2 .g-box { display: none; }
#gacha .g-title { position: relative; font-family: var(--pixel); font-size: 1.8rem; color: #fff; text-shadow: 0 3px 0 var(--ink), 0 0 16px var(--rc); margin-bottom: 10px; opacity: 0; }
#gacha.g2 .g-title { opacity: 1; animation: rvSlam .5s cubic-bezier(.2, 1.6, .4, 1); }
#gacha.r5 .g-title { animation: rvSlam .5s cubic-bezier(.2, 1.6, .4, 1), rainbow 1s linear infinite; }
.g-res { position: relative; display: none; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 440px; }
#gacha.g2 .g-res { display: grid; }
.g-res.one { grid-template-columns: 1fr; max-width: 230px; }
.g-card { --rc: #c0c0c0; background: var(--paper); border: 3px solid var(--rc); border-radius: 12px; padding: 6px 3px; text-align: center; box-shadow: 0 0 12px var(--rc); opacity: 0; animation: gIn .35s calc(var(--i) * .08s) cubic-bezier(.2, 1.6, .4, 1) forwards; min-width: 0; }
.g-card.r1 { --rc: #5cc84a; } .g-card.r2 { --rc: #3f98f0; } .g-card.r3 { --rc: #b05ef0; } .g-card.r4 { --rc: #f0a020; } .g-card.r5 { --rc: #ff4f6d; }
.g-card .g-ic { font-size: 1.7rem; line-height: 1.2; }
.g-card b { display: block; font-size: 0.7rem; line-height: 1.15; word-break: break-word; }
.g-card small { display: block; font-size: 0.64rem; color: var(--rc); font-weight: 900; filter: brightness(.8); }
.g-res.one .g-card { padding: 14px 10px; }
.g-res.one .g-ic { font-size: 4.2rem; }
.g-res.one b { font-size: 1.25rem; margin-top: 4px; }
.g-res.one small { font-size: 0.9rem; }
.g-res.one em { display: block; font-style: normal; font-size: 0.82rem; color: var(--ink2); margin-top: 4px; }
@keyframes gIn { from { opacity: 0; transform: scale(.3) rotate(-12deg); } to { opacity: 1; transform: none; } }
#gacha .g-ok { position: relative; margin-top: 14px; opacity: 0; pointer-events: none; }
#gacha.g2 .g-ok { opacity: 1; pointer-events: auto; transition: opacity .3s .6s; }
#gacha.g2 .rv-conf i { animation: conf 1.9s var(--del) cubic-bezier(.1, .7, .3, 1) forwards; }
#gacha.g2 .rv-flash { animation: rvFlash .5s ease-out; }

/* ---------------- panel statistik ---------------- */
#hud-player { cursor: pointer; }
.prof { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #fff8e6, #ffe9b8); border: 3px solid var(--gold-d); border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; }
.pf-face { width: 64px; height: 48px; image-rendering: pixelated; background: #cfe8ff; border: 3px solid var(--ink); border-radius: 10px; flex: 0 0 64px; }
.pf-info { flex: 1; min-width: 0; }
.pf-info b { display: block; font-size: 1.15rem; }
.pf-info small { display: block; font-size: 0.85rem; color: var(--ink2); }
.statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stile { background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; text-align: center; padding: 6px 2px; min-width: 0; }
.stile i { display: block; font-style: normal; font-size: 1.3rem; }
.stile b { display: block; font-size: 1rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stile small { display: block; font-size: 0.72rem; color: var(--ink2); }
.sb { background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 6px 10px; margin-bottom: 7px; }
.sb-h { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 900; }
.sb-h b { color: #1e7a1e; }
.sb-i { font-size: 0.78rem; color: var(--ink2); margin: 1px 0 4px; }
.sb-l div { display: flex; justify-content: space-between; gap: 8px; font-size: 0.86rem; padding: 2px 0; border-top: 1px dashed var(--cream-d); }
.sb-l div span { min-width: 0; }
.sb-l div small { color: var(--ink2); font-size: 0.74rem; }
.sb-l .muted { color: var(--ink2); }
.rodcard .best { font-size: 0.7rem; background: var(--red); color: #fff; padding: 0 6px; border-radius: 6px; vertical-align: 2px; }
.stars.small i { font-size: 0.8rem; }
.row.wrap { flex-wrap: wrap; }
.chips2 { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.chips2 .rar { font-size: 0.75rem; }
.pill { display: inline-block; background: var(--cream); border: 1px solid var(--cream-d); border-radius: 8px; padding: 1px 6px; font-size: 0.78rem; font-weight: 800; }

/* ---------------- butik mode & perlengkapan ---------------- */
.avatar { width: 60px; height: 84px; image-rendering: pixelated; image-rendering: crisp-edges; }
.avatar.sm { width: 50px; height: 70px; flex: 0 0 50px; }
.fashead { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #fff0f6, #ffe0ee); border: 3px solid #d0609a; border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; }
.fashead .avatar { width: 80px; height: 112px; flex: 0 0 80px; background: radial-gradient(circle at 50% 60%, #ffffff 0 35%, transparent 70%); }
.fashead b { display: block; font-size: 1.05rem; }
.fashead small { display: block; font-size: 0.84rem; line-height: 1.45; }
.fashead em, .gear-list em { color: #1e7a1e; font-style: normal; font-weight: 900; }
.luckbig { margin-top: 4px; font-size: 0.95rem; }
.fx-prev { width: 50px; height: 50px; flex: 0 0 50px; font-size: 1.9rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle, #fff6c0, #ffd0f0); animation: auraPulse 1.6s ease-in-out infinite; }
.fx-prev.big { width: 90px; height: 90px; font-size: 3.4rem; margin: 6px auto; }
.item.fash.hasfx { border-color: #e0a0ff; background: linear-gradient(90deg, #fff, #faf2ff); }
.item.fash.eq { border-color: var(--green); background: #f2fff0; }
.fxs { background: #f3e8ff !important; border-color: #d0a8f0 !important; }
.pf-face.av { width: 60px; height: 84px; flex: 0 0 60px; background: radial-gradient(circle at 50% 60%, #ffffff 0 35%, #cfe8ff 75%); }
.gear { display: flex; gap: 10px; align-items: center; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px; margin-bottom: 8px; }
.gear-rod { text-align: center; flex: 0 0 116px; min-width: 0; }
.gear-rod b { display: block; font-size: 0.86rem; margin-top: 2px; }
.gear-rod b em { color: var(--gold-d); font-style: normal; }
.gear-rod small { display: block; font-size: 0.74rem; color: #6a2ac0; font-weight: 800; }
.gear-list { flex: 1; min-width: 0; font-size: 0.88rem; line-height: 1.6; }
.gear-sum { margin-top: 2px; padding-top: 3px; border-top: 2px dashed var(--cream-d); }

/* ---------------- online: chat global, leaderboard, nama pemain ---------------- */
#chat { position: absolute; left: 8px; top: calc(var(--safe-t) + 6.1rem); width: min(56vw, 270px); z-index: 7; display: flex; flex-direction: column; gap: 3px; }
.chat-head { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.chat-head span { font-weight: 900; white-space: nowrap; }
.chat-head em { font-style: normal; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chat-hide { flex: none; background: rgba(15, 10, 6, .55); color: #fff; border: 2px solid rgba(255, 255, 255, .4); border-radius: 8px; width: 28px; height: 22px; padding: 0; font: 900 .8rem var(--font); }
.chat-log { max-height: 7.4rem; overflow-y: auto; overscroll-behavior: contain; background: rgba(15, 10, 6, .45); border-radius: 10px; padding: 4px 8px; font-size: .8rem; line-height: 1.3; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .85); scrollbar-width: none; }
.chat-log::-webkit-scrollbar { display: none; }
.chat-log p { margin: 1px 0; overflow-wrap: anywhere; font-weight: 700; }
.chat-log p.sys { color: #ffe27a; }
#chat-form { display: flex; gap: 4px; }
#chat-in { flex: 1; min-width: 0; height: 32px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .5); background: rgba(15, 10, 6, .55); color: #fff; padding: 0 9px; font: 700 .9rem var(--font); -webkit-user-select: text; user-select: text; }
#chat-in::placeholder { color: rgba(255, 255, 255, .7); }
#chat-in:focus { outline: none; border-color: var(--gold); background: rgba(15, 10, 6, .82); }
#chat-form button { flex: none; width: 36px; height: 32px; border-radius: 10px; border: 2px solid var(--ink); background: var(--gold); color: var(--ink); font-weight: 900; padding: 0; }
#btn-chat { position: absolute; left: 8px; top: calc(var(--safe-t) + 6.1rem); z-index: 7; width: 42px; height: 42px; border-radius: 50%; background: rgba(15, 10, 6, .6); border: 2px solid rgba(255, 255, 255, .55); color: #fff; font-size: 1.2rem; padding: 0; }
#chat-unread { position: absolute; top: -5px; right: -6px; min-width: 18px; background: var(--red); color: #fff; font: 900 .7rem var(--font); font-style: normal; border-radius: 9px; padding: 1px 4px; border: 2px solid var(--ink); }
#chat-unread:empty { display: none; }

#online { width: 9.6rem; padding: 3px 7px 4px; font-size: .76rem; }
#online.closed { width: auto; padding: 3px 9px; }
#on-toggle { all: unset; cursor: pointer; display: block; width: 100%; font-weight: 900; font-size: .86rem; }
#on-toggle i { float: right; font-style: normal; font-size: .65rem; opacity: .55; margin-top: 3px; }
.lb-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin: 3px 0; }
.lb-tabs button { border: 2px solid var(--cream-d); background: #fff; border-radius: 7px; padding: 0; height: 22px; font-size: .8rem; }
.lb-tabs button.on { background: var(--gold); border-color: var(--gold-d); }
#online ol { list-style: none; margin: 0; padding: 0; max-height: 9.8rem; overflow-y: auto; scrollbar-width: none; }
#online li { display: flex; gap: 4px; align-items: baseline; padding: 1px 2px; border-bottom: 1px dashed var(--cream-d); }
#online li:last-child { border-bottom: 0; }
#online li .rk { flex: none; width: 1.25rem; text-align: center; font-size: .72rem; }
#online li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#online li em { flex: none; font-style: normal; font-weight: 900; color: var(--gold-d); }
#online li.me { background: #fff1a8; border-radius: 6px; }
.lb-note { margin: 3px 0 1px; font-size: .72rem; color: var(--ink2); line-height: 1.25; }
.lb-me { margin: 3px 0 0; text-align: center; font-weight: 900; }

.ntag { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; color: #fff; font-size: .72rem; line-height: 1.05; text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.ntag b { display: block; font-weight: 900; }
.ntag small { font-size: .62rem; font-weight: 800; opacity: .9; }
.ntag.owner b { color: var(--gold); }
.nbubble { position: absolute; left: 0; top: 0; max-width: 11rem; width: max-content; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 2px 8px; font-size: .78rem; font-weight: 800; text-align: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); overflow-wrap: anywhere; }
.nbubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0; }

/* ---------------- ikan monster (Legendaris → RAHASIA) ---------------- */
/* kanvas monster 36x24 (ikan biasa 24x16): kotaknya lebih besar, margin negatif agar tata letak tetap */
.fimg.mon { width: 84px; height: 56px; margin: -4px auto; }
.fimg.big.mon { width: 216px; height: 144px; margin: -24px auto; max-width: 100%; }
.c-img .fimg.big.mon { width: 252px; height: 168px; margin: -20px auto; max-width: 86vw; }
.fimg.huge.mon { width: 324px; height: 216px; max-width: 92vw; }
.fimg.m4 { animation: mon4 2s ease-in-out infinite; }
.fimg.m5 { animation: mon5 1.4s ease-in-out infinite; }
.fimg.m6 { animation: mon6 1.1s linear infinite; }
@keyframes mon4 { 0%, 100% { filter: drop-shadow(0 0 3px var(--glow)); } 50% { filter: drop-shadow(0 0 7px var(--glow)) brightness(1.12); } }
@keyframes mon5 {
  0%, 100% { filter: drop-shadow(0 0 3px #ff3a2a) drop-shadow(0 0 6px var(--glow)); transform: translateY(0); }
  50% { filter: drop-shadow(0 0 6px #ff3a2a) drop-shadow(0 0 12px var(--glow)) brightness(1.1); transform: translateY(-2px); }
}
@keyframes mon6 {
  0% { filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 10px #ff2a6a); transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { filter: drop-shadow(0 0 8px var(--glow)) drop-shadow(0 0 16px #8a2aff) brightness(1.15); transform: translate(-1px, 0); }
  75% { transform: translate(0, 1px); }
  100% { filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 10px #ff2a6a); transform: translate(0, 0); }
}

/* ---------------- premium & HSCoin ---------------- */
#hud-name.prem { color: #f0b400; text-shadow: 0 1px 0 #5a3a00; }
.ntag.prem b { color: #ffd84a; }
#online li b.prem { color: #c88a00; }
.item.premrod { border-color: #e0b030; background: linear-gradient(90deg, #fffbea, #fff1c0); }
.plate.coins.hs::after { content: 'HS'; margin-left: 5px; font-size: .62rem; font-weight: 900; color: #fff; background: #3a7ad0; border-radius: 6px; padding: 1px 4px; vertical-align: middle; }

/* ---------------- menu bawah bisa disembunyikan ---------------- */
#menu { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; transition: transform .25s ease; }
#menu button span { font-size: 0.72rem; }
#btn-menu { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 4.45rem); z-index: 9; height: 22px; min-width: 46px; padding: 0 10px; border: 3px solid var(--ink); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--wood-l); color: var(--ink); font: 900 .85rem var(--font); line-height: 1; transition: bottom .25s ease; }
#cast-wrap, #stick, #dialog, #tap-hint { transition: bottom .25s ease; }
#app.nomenu #menu { transform: translateY(105%); }
#app.nomenu #btn-menu { bottom: 0; padding-bottom: var(--safe-b); height: calc(26px + var(--safe-b)); }
#app.nomenu #cast-wrap { bottom: calc(var(--safe-b) + 2.2rem); }
#app.nomenu #stick { bottom: calc(var(--safe-b) + 2.4rem); }
#app.nomenu #dialog { bottom: calc(var(--safe-b) + 2.2rem); }
#app.nomenu #tap-hint { bottom: calc(var(--safe-b) + 8.5rem); }

/* lencana VIP (member premium) di HUD, chat, leaderboard & nama di atas kepala */
.vip { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px solid #7a4a00; border-radius: 4px; background: linear-gradient(#fff0a0, #f0b400); color: #3a2200; font: 900 .58rem/1.35 var(--font); letter-spacing: .3px; vertical-align: middle; text-shadow: none; white-space: nowrap; }
#online li .vip { flex: none; margin: 0 2px 0 0; }
.ntag .vip { font-size: .52rem; }

/* ---------------- pilih karakter & info premium ---------------- */
.gpicks { display: flex; gap: 12px; justify-content: center; margin: 8px 0; }
.gpick { flex: 1; max-width: 140px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 6px 6px; box-shadow: inset 0 -4px 0 var(--cream-d); }
.gpick .avatar { width: 80px; height: 112px; display: block; margin: 0 auto 4px; background: radial-gradient(circle at 50% 60%, #ffffff 0 35%, #cfe8ff 75%); border-radius: 10px; }
.gpick b { font-size: 1.05rem; }
.gpick:active { transform: translateY(2px); background: var(--gold); }
.prem-banner { background: linear-gradient(135deg, #fff8d8, #ffe9a0); border: 3px solid #d8a020; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.prem-banner > b { display: block; font-size: .98rem; }
.prem-banner > small { display: block; font-weight: 800; color: var(--gold-d); }
.prem-banner .btn { margin-top: 4px; }
.prem-banner.on { background: linear-gradient(135deg, #fffbe8, #fff1c0); }
.prem-list { margin: 6px 0 4px; padding-left: 4px; list-style: none; font-size: .84rem; line-height: 1.45; text-align: left; }

/* ---------------- layanan ditangguhkan & tab tidak terpotong ---------------- */
.tabs { flex-wrap: wrap; overflow-x: visible; }
#maint { position: absolute; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 50% 40%, rgba(60, 20, 20, .92), rgba(20, 8, 8, .97)); }
#maint .mt-box { max-width: 340px; text-align: center; background: var(--paper); border: 4px solid var(--ink); border-radius: 18px; padding: 18px 16px; box-shadow: 0 6px 0 rgba(0, 0, 0, .4); }
#maint .mt-ic { font-size: 3.2rem; line-height: 1; }
#maint h2 { margin: 8px 0 6px; font-family: var(--pixel); font-size: 1.5rem; color: var(--red); }
#maint p { margin: 6px 0; font-size: 1rem; font-weight: 900; }
#maint p:empty { display: none; }
#maint small { display: block; color: var(--ink2); font-size: .85rem; }
#maint-owner { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 3.4rem); z-index: 12; background: rgba(160, 30, 20, .95); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 4px 8px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
#maint-owner button { margin-left: 6px; border: 2px solid var(--ink); border-radius: 8px; background: var(--green); color: #fff; font: 900 .75rem var(--font); padding: 1px 6px; }
.maint-stat { font-size: 1.15rem; font-weight: 900; margin: 4px 0; }
.maint-stat.ok { color: #1e7a1e; }
.maint-stat.off { color: var(--red); }
.maint-stat small { display: block; font-size: .8rem; color: var(--ink2); font-weight: 700; }

/* batas HSCoin harian di Tempat Penjualan */
.daycap { background: #eef6ff; border: 3px solid #8ab4e8; border-radius: 12px; padding: 6px 10px; margin-bottom: 8px; }
.daycap > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.daycap span { font-weight: 900; }
.daycap small { display: block; margin-top: 3px; font-size: .76rem; color: var(--ink2); }
.daycap.full { background: #fff1ec; border-color: #e09070; }

/* ---------------- upgrade +100 & misi koleksi ---------------- */
.lvbar { position: relative; height: 18px; margin: 4px auto 6px; max-width: 260px; background: #e8dcc0; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; }
.lvbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ffd040, #ff9a20); }
.lvbar span { position: relative; display: block; text-align: center; font-size: .72rem; font-weight: 900; line-height: 14px; }
.lvbar.small { height: 14px; margin: 3px 0; max-width: 170px; }
.lvbar.small span { font-size: .62rem; line-height: 10px; }
.upbtns { display: flex; gap: 8px; }
.upbtns .btn { flex: 1; line-height: 1.15; }
.mission { background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.mission.ready { border-color: var(--gold); background: linear-gradient(135deg, #fffdf0, #fff4c8); }
.mission > b { display: block; font-size: 1rem; }
.mission > small { display: block; color: var(--ink2); margin-bottom: 4px; }
.mneed { display: flex; align-items: center; gap: 8px; padding: 2px 0; border-bottom: 1px dashed var(--cream-d); }
.mneed span { flex: 1; font-size: .85rem; }
.mneed b { font-size: .85rem; color: var(--red); }
.mneed.ok b { color: #1e7a1e; }
.mneed .ic.emo { width: 48px; text-align: center; font-size: 1.4rem; }
.fimg.mn { width: 48px; height: 32px; margin: 0; flex: none; }
.fimg.mn.mon { width: 54px; height: 36px; margin: -2px 0; }
.mrw { font-size: .8rem; font-weight: 800; margin: 5px 0; color: var(--gold-d); }

/* ---------------- tab chat, daftar online, papan peringkat ---------------- */
.chat-head .ctab { flex: none; position: relative; background: rgba(15, 10, 6, .5); color: #fff; border: 2px solid rgba(255, 255, 255, .35); border-radius: 8px; padding: 1px 7px; font: 900 .72rem var(--font); }
.chat-head .ctab.on { background: var(--gold); color: var(--ink); border-color: var(--ink); }
.chat-head .ctab i { position: absolute; top: -6px; right: -3px; color: var(--red); font-style: normal; font-size: 1.1rem; line-height: 1; }
.chat-head #chat-hide { margin-left: auto; }
#online { width: 9.6rem; }
#on-toggle small { font-size: .7rem; opacity: .75; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 8px; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 6px 10px; margin-bottom: 6px; }
.rank-list li .rk { flex: none; width: 2.2rem; text-align: center; font-weight: 900; font-size: 1.05rem; }
.rank-list li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.rank-list li b small { display: block; font-size: .72rem; color: var(--ink2); font-weight: 800; }
.rank-list li b.prem { color: #c88a00; }
.rank-list li em { flex: none; font-style: normal; font-weight: 900; color: var(--gold-d); }
.rank-list li.top1 { border-color: #f0c020; background: linear-gradient(90deg, #fff8d0, #fff); }
.rank-list li.top2 { border-color: #c0c0d0; }
.rank-list li.top3 { border-color: #d89060; }
.rank-list li.me { background: #fff1a8; }
.rank-me { text-align: center; font-size: 1rem; }

/* ---------------- profil pemain & EDISI LIMITED ---------------- */
.pf-head { display: flex; gap: 12px; align-items: center; text-align: left; margin-bottom: 4px; }
.pf-head .avatar { width: 70px; height: 98px; flex: none; background: radial-gradient(circle at 50% 60%, #fff 0 35%, #cfe8ff 75%); border-radius: 12px; }
.pf-head b { display: block; font-size: 1.15rem; }
.pf-head b.prem { color: #c88a00; }
.pf-head small { display: block; font-size: .82rem; color: var(--ink2); }
.pf-head small b { display: inline; font-size: inherit; color: var(--ink); }
.pf-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 3px solid var(--cream-d); border-radius: 12px; padding: 4px 8px; margin-bottom: 5px; font: inherit; color: inherit; }
.pf-row:active { background: var(--cream); }
.pf-row > span:first-of-type, .pf-row > span:nth-of-type(1) { }
.pf-row span small { display: block; font-size: .7rem; color: var(--ink2); }
.pf-row span b { font-size: .92rem; }
.pf-row span b em { color: var(--gold-d); font-style: normal; }
.pf-row > span:not(.pf-ic):not(.ltd):not(.pf-tag) { flex: 1; min-width: 0; }
.pf-row .ic { width: 40px; height: 40px; flex: none; }
.pf-ic { width: 40px; flex: none; text-align: center; font-size: 1.6rem; }
.pf-row i { flex: none; font-style: normal; font-size: 1.3rem; color: var(--ink2); }
.pf-tag { flex: none; font-size: .72rem; font-weight: 900; background: #eefbe8; border: 2px solid #8ad070; border-radius: 8px; padding: 0 5px; }
.ltd { flex: none; display: inline-block; font-size: .66rem; font-weight: 900; color: #fff; background: linear-gradient(90deg, #ff4f9a, #8a4aff, #2ac8ff); border: 2px solid var(--ink); border-radius: 8px; padding: 0 5px; letter-spacing: .3px; }
.ltd.big { font-size: 1rem; padding: 2px 12px; margin: 6px auto; }
.item.fash.ltditem { border-color: #a070ff; background: linear-gradient(90deg, #fff, #f6eaff); }
.pd-head { text-align: center; }
.pd-head h3 { margin: 4px 0 2px; }
.pd-head h3 em { color: var(--gold-d); font-style: normal; }
.pd-type { display: inline-block; font-size: .8rem; font-weight: 900; background: var(--cream); border: 2px solid var(--cream-d); border-radius: 8px; padding: 0 8px; }
.pd-desc { font-size: .9rem; color: var(--ink2); }
.pd-tab td:first-child { white-space: nowrap; width: 1%; padding-right: 8px; }
.pd-tab td { text-align: left; }
.item .stats span.ltd { color: #fff; background: linear-gradient(90deg, #ff4f9a, #8a4aff, #2ac8ff); border: 2px solid var(--ink); }

/* layar ditangguhkan: status & tombol masuk ulang */
#maint #maint-st { display: block; margin: 10px 0 4px; font-size: .9rem; color: var(--ink2); }
#maint #maint-st.ok { color: #1f8a3a; }
#maint .mt-btns { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
#maint .mt-btns .btn { flex: 1; }
#maint .btn.pulse { animation: mtPulse 1s ease-in-out infinite; }
@keyframes mtPulse { 50% { transform: scale(1.06); } }

/* tombol simpan manual */
.hud-row { display: flex; gap: 5px; align-items: stretch; }
#btn-save { font: inherit; color: inherit; cursor: pointer; padding-left: 7px; padding-right: 7px; }
#btn-save.saving, #set-save.saving { opacity: .6; }
#btn-save.saved, #set-save.saved { background: #8fe07a; }
.savebox { margin-bottom: 10px; text-align: center; }
.savebox small { display: block; margin-top: 4px; font-size: .78rem; color: var(--ink2); }

/* pengumuman owner */
#bc-banner { display: none; position: fixed; left: 50%; top: calc(var(--safe-t, 0px) + 64px); transform: translateX(-50%); z-index: 70; width: min(92vw, 420px);
  background: linear-gradient(180deg, #fff8dc, #ffeab0); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 rgba(0, 0, 0, .35); padding: 8px 34px 9px 12px; cursor: pointer; }
#bc-banner.show { display: block; animation: bcIn .35s ease-out; }
#bc-banner.out { animation: bcOut .3s ease-in forwards; }
#bc-banner .bc-head { font-weight: 900; font-size: .85rem; color: #b06a00; }
#bc-banner .bc-text { font-weight: 800; font-size: .95rem; line-height: 1.3; max-height: 4em; overflow: hidden; }
#bc-banner .bc-x { position: absolute; right: 6px; top: 6px; border: 0; background: none; font: 900 1rem var(--font); color: var(--ink2); }
.bc-full { text-align: left; font-size: 1rem; line-height: 1.4; }
@keyframes bcIn { from { transform: translate(-50%, -30px); opacity: 0; } }
@keyframes bcOut { to { transform: translate(-50%, -30px); opacity: 0; } }

/* ================= tingkat SECRET (r7) & pancingan tertinggi ================= */
.r7 { --rc: #ffffff; }
#bite.r7 { color: #fff; text-shadow: 0 0 8px #ff40e0, 0 0 16px #40fff0, 0 3px 0 var(--ink); animation: bounce .12s infinite alternate, primeFlash .5s steps(2) infinite; }
@keyframes primeFlash { 50% { color: #ff40e0; } }
.rar.r7 { background: linear-gradient(90deg, #1a0030, #ff40e0, #40fff0, #ffffff, #1a0030); background-size: 300% 100%; color: #fff; animation: rbmove2 2s linear infinite; text-shadow: 0 1px 0 #000; }
@keyframes rbmove2 { to { background-position: 300% 0; } }
#rare-banner.r7 b { color: #fff; text-shadow: 0 0 10px #ff40e0, 0 0 20px #40fff0, 0 3px 0 #000; animation: rarePulse .25s ease-in-out infinite alternate, primeFlash .4s steps(2) infinite; }
/* kartu ikan Secret: hitam kosmik dengan bingkai prisma berjalan */
.card.prime { color: #fff; border-color: transparent; background: radial-gradient(circle at 50% 35%, #2a0a40, #05000a 75%) padding-box, linear-gradient(90deg, #ffffff, #ff40e0, #1a0030, #40fff0, #ffffff) border-box; background-size: 100% 100%, 300% 100%; animation: rbmove 2s linear infinite; box-shadow: 0 0 10px rgba(255, 64, 224, .55); }
.card.prime b, .card.prime small { color: #fff; }
.card.prime small { color: #ffb0f8; }
.card.prime.unk { background: radial-gradient(circle at 50% 35%, #14001e, #000 75%) padding-box, linear-gradient(90deg, #ffffff, #ff40e0, #1a0030, #40fff0, #ffffff) border-box; background-size: 100% 100%, 300% 100%; }
.card.prime .val, .card.prime .odds { color: #ffe86a; }
/* gambar monster Secret: bergetar, cahaya putih-magenta-sian berganti, warna berputar */
.fimg.m7 { animation: mon7 .9s linear infinite; }
@keyframes mon7 {
  0% { filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 10px #ff40e0); transform: translate(0, 0) scale(1); }
  20% { transform: translate(1px, -1px) scale(1.02); }
  40% { filter: drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 16px #40fff0) hue-rotate(40deg) brightness(1.2); transform: translate(-1px, 1px); }
  60% { transform: translate(1px, 0) scale(1.03); }
  80% { filter: drop-shadow(0 0 8px #ffe060) drop-shadow(0 0 18px #8040ff) brightness(1.3); transform: translate(0, -1px); }
  100% { filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 10px #ff40e0); transform: translate(0, 0) scale(1); }
}
/* layar pengungkapan Secret: lubang hitam, retakan cahaya, sinar prisma */
#reveal.prime .rv-bg { background: radial-gradient(circle at 50% 45%, rgba(40, 0, 60, .7), #000 70%); }
#reveal.prime .rv-rays { background: repeating-conic-gradient(#ffffff 0 4deg, transparent 4deg 10deg, #ff40e0 10deg 14deg, transparent 14deg 20deg, #40fff0 20deg 24deg, transparent 24deg 30deg); animation-duration: 1.4s; }
#reveal.prime.s2 .rv-rays { opacity: .75; animation-duration: 3s; }
#reveal.prime .rv-q { font-size: 5rem; color: #ff40e0; text-shadow: 0 0 30px #ff40e0, 0 0 60px #40fff0, 0 4px 0 #000; animation: rarePulse .2s ease-in-out infinite alternate, primeFlash .3s steps(2) infinite; }
#reveal .rv-void { position: absolute; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; background: #000; box-shadow: 0 0 40px 18px #ff40e0, 0 0 90px 40px rgba(64, 255, 240, .5), inset 0 0 20px #8040ff; z-index: 1; animation: voidGrow 2.6s ease-in forwards; }
#reveal.s2 .rv-void { animation: voidBurst .6s ease-out forwards; }
@keyframes voidGrow { to { transform: scale(7); } }
@keyframes voidBurst { from { transform: scale(7); opacity: 1; } to { transform: scale(18); opacity: 0; } }
#reveal .rv-crack { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background:
  linear-gradient(115deg, transparent 48.6%, #fff 49.2%, #fff 49.6%, transparent 50.2%),
  linear-gradient(62deg, transparent 49%, #ff40e0 49.4%, transparent 49.9%),
  linear-gradient(160deg, transparent 49.2%, #40fff0 49.5%, transparent 49.9%);
  animation: crackIn 2.6s steps(6) forwards; }
@keyframes crackIn { 70% { opacity: 0; } 72% { opacity: 1; } 85% { opacity: .3; } 100% { opacity: 1; } }
#reveal.prime.s2 .rv-crack { animation: none; opacity: 0; transition: opacity .3s; }
#reveal.prime.s2 .rv-title b { color: #fff; animation: primeFlash .35s steps(2) infinite; text-shadow: 0 4px 0 #000, 4px 0 0 #000, -4px 0 0 #000, 0 -4px 0 #000, 0 0 30px #ff40e0, 0 0 60px #40fff0; }
#reveal.prime.s2 .rv-fish .fimg { filter: drop-shadow(0 0 12px #ffffff) drop-shadow(0 0 30px #ff40e0) drop-shadow(0 0 50px #40fff0); }
#catch.prime .rays { background: repeating-conic-gradient(from 0deg, #ffffff88 0 6deg, transparent 6deg 12deg, #ff40e088 12deg 18deg, transparent 18deg 24deg, #40fff088 24deg 30deg, transparent 30deg 36deg); animation-duration: 2.5s; }
#catch.prime .catch-card { background: radial-gradient(circle at 50% 30%, #3a0a5a, #0a0012 80%); color: #fff; border-color: #ff40e0; box-shadow: 0 0 24px #ff40e0, 0 0 48px rgba(64, 255, 240, .5); }
#catch.prime .catch-card .c-name, #catch.prime .catch-card .c-stats span { color: #fff; }
#catch.prime .c-rar { background: linear-gradient(90deg, #1a0030, #ff40e0, #40fff0, #ffffff, #1a0030); background-size: 300% 100%; animation: rbmove2 1.5s linear infinite; }
.c-secret.c-prime { color: #fff; animation: primeFlash .4s steps(2) infinite; text-shadow: 0 0 10px #ff40e0, 0 0 20px #40fff0, 0 2px 0 #000; }
/* ikon pancingan Primordial & Absolute */
.ic-wrap.fx-prim::before { background: conic-gradient(#ff3ad0, #1a0028, #9a30ff, #1a0028, #ff3ad0); filter: blur(5px); opacity: .85; animation: auraPulse 1.2s ease-in-out infinite, spin 2s linear infinite; }
.ic-wrap.fx-prim .ic { filter: drop-shadow(0 0 3px #ff3ad0) drop-shadow(0 0 6px #9a30ff); }
.ic-wrap.fx-abs::before { background: conic-gradient(#ffffff, #ffe060, #ff80ff, #80ffff, #ffffff); filter: blur(6px); opacity: .9; animation: auraPulse 1s ease-in-out infinite, spin 1.6s linear infinite; }
.ic-wrap.fx-abs .ic { filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 8px #ffe060); }
/* syarat pancingan di toko */
.item .need { margin-top: 3px; font-size: .74rem; font-weight: 800; color: #b03020; }
.item .need.ok { color: #1f8a3a; }
/* koleksi ikan di profil */
.pf-fish { margin-top: 6px; }
.pf-sum { margin: 2px 0 4px; }
.pf-rar { justify-content: center; margin-bottom: 6px; }
.pf-grid { max-height: 52vh; overflow-y: auto; }

/* pengali harga ikan per pulau */
.island .stats span.mult { background: #ffd040; color: #2b1d14; }
#area-banner em { display: block; margin-top: 4px; font-style: normal; font-weight: 900; font-size: .9rem; color: #ffe27a; text-shadow: 0 2px 0 #000; }
