/* Meong City — © Rumah Edukasi Digital */
:root {
  --accent: #f29a3a;
  --accent-dark: #d97f1c;
  --ink: #2b3445;
  --soft: #5b6678;
  --panel: rgba(255, 255, 255, .9);
  --sky: #e3f3f8;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  font-family: ui-rounded, "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden; background: #6fb55f; color: var(--ink);
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none;
}

[hidden] { display: none !important; }

#game { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; }

button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #2f7fd8; outline-offset: 2px; }

/* ---------- layar masuk ---------- */
.screen {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-t)) 16px calc(40px + var(--safe-b));
  background: radial-gradient(ellipse at center, rgba(227, 243, 248, .35), rgba(227, 243, 248, .75));
  overflow-y: auto; touch-action: pan-y;
}
.card {
  width: min(420px, 100%); background: var(--panel); border-radius: 26px; padding: 22px 22px 18px;
  box-shadow: 0 14px 44px rgba(30, 60, 80, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-align: center; margin: auto;
}
.card h1 { margin: 0; font-size: 2rem; letter-spacing: .5px; color: #d97f1c; }
.sub { margin: 4px 0 6px; color: var(--soft); font-size: .95rem; }
#preview { width: 220px; height: 183px; max-width: 70%; display: block; margin: 0 auto 6px; }

.field { display: block; text-align: left; margin: 10px 0; }
.field > span { display: block; font-size: .8rem; font-weight: 700; color: var(--soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 1.05rem; border-radius: 14px; border: 2px solid #d4dde5;
  background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text;
}
.field input:focus { border-color: var(--accent); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #cfd8e0;
  padding: 0;
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--accent); transform: scale(1.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 2px solid #d4dde5; background: #fff; color: var(--ink); font-weight: 600; }
.chip[aria-checked="true"] { border-color: var(--accent); background: #fff4e3; color: var(--accent-dark); }

.primary {
  width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 16px; font-weight: 800; font-size: 1.1rem;
  color: #fff; background: linear-gradient(#f7ad55, var(--accent)); box-shadow: 0 5px 0 var(--accent-dark);
}
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-dark); }
.primary:disabled { opacity: .6; }
.primary.small { width: auto; padding: 8px 22px; font-size: 1rem; margin-top: 8px; }
.ghost { width: 100%; margin-top: 12px; padding: 10px; border: 0; background: transparent; color: var(--soft); text-decoration: underline; }
.status { min-height: 1.3em; margin: 8px 0 0; font-size: .88rem; color: #c0392b; }
.status.ok { color: var(--soft); }

/* ---------- footer ---------- */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; text-align: center; pointer-events: none;
  padding: 4px 8px calc(4px + var(--safe-b)); font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
}

/* ---------- HUD ---------- */
#hud { position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }

.pill {
  position: absolute; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--panel); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: .85rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .18); pointer-events: none !important;
}
.pill .sep { margin: 0 6px; color: #aab4c2; }

#topright { position: absolute; top: calc(10px + var(--safe-t)); right: calc(10px + var(--safe-r)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#minimap { width: 150px; height: 100px; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .25); background: #8fcf7a; }
.iconbtns { display: flex; gap: 8px; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel); font-size: 1.15rem; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); padding: 0; }

.banner {
  position: absolute; top: calc(56px + var(--safe-t)); left: 50%; transform: translateX(-50%);
  background: #fff3cd; color: #7a5b00; padding: 8px 16px; border-radius: 12px; font-weight: 700; font-size: .88rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .2); max-width: 90vw; text-align: center; pointer-events: none !important;
}

#toasts {
  position: absolute; top: calc(52px + var(--safe-t)); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 6px; align-items: center; width: min(92vw, 420px); pointer-events: none !important;
}
.toast {
  background: rgba(43, 52, 69, .92); color: #fff; padding: 9px 16px; border-radius: 14px; font-size: .9rem; font-weight: 600;
  text-align: center; animation: pop .25s ease-out; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.toast.good { background: rgba(217, 127, 28, .95); }
.toast.out { opacity: 0; transform: translateY(-6px); transition: all .35s; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.95); } to { opacity: 1; transform: none; } }

.help {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, 90vw);
  background: var(--panel); border-radius: 22px; padding: 18px 20px; box-shadow: 0 14px 44px rgba(0, 0, 0, .35); text-align: center;
}
.help h2 { margin: 0 0 8px; color: #d97f1c; }
.help ul { text-align: left; padding-left: 18px; margin: 0; line-height: 1.5; font-size: .93rem; }

#chatlog {
  position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(112px + var(--safe-b)); width: min(330px, 62vw); max-height: 170px;
  overflow-y: auto; background: rgba(255, 255, 255, .78); border-radius: 14px; padding: 8px 10px; font-size: .84rem; line-height: 1.35;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .15); touch-action: pan-y; -webkit-user-select: text; user-select: text;
}
#chatlog:empty { display: none; }
#chatlog .m { margin: 2px 0; word-break: break-word; }
#chatlog .m b { color: #c76a0c; }
#chatlog .m.sys { color: var(--soft); font-style: italic; }
#chatlog .m.me b { color: #2f7fd8; }

.act {
  position: absolute; left: 50%; bottom: calc(118px + var(--safe-b)); transform: translateX(-50%);
  padding: 11px 22px; border-radius: 999px; border: 0; font-weight: 800; color: #fff; background: #3d7fd6;
  box-shadow: 0 5px 0 #2a5fa8, 0 6px 14px rgba(0, 0, 0, .25); animation: bob 1.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateX(-50%) translateY(-4px); } }

.emotes {
  position: absolute; left: 50%; bottom: calc(64px + var(--safe-b)); transform: translateX(-50%);
  display: flex; gap: 6px; background: var(--panel); padding: 5px 8px; border-radius: 999px; box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
}
.emotes button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; font-size: 1.35rem; padding: 0; }
.emotes button:active { background: #ffe9c9; }

#chatform {
  position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%);
  width: min(560px, calc(100vw - 20px)); display: flex; gap: 8px;
}
#chatform input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 2px solid transparent; font-size: 1rem;
  background: var(--panel); box-shadow: 0 3px 12px rgba(0, 0, 0, .2); -webkit-user-select: text; user-select: text;
}
#chatform input:focus { border-color: var(--accent); }
.send { padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 800; box-shadow: 0 3px 12px rgba(0, 0, 0, .2); }

/* joystick */
#stick {
  position: absolute; left: calc(22px + var(--safe-l)); bottom: calc(120px + var(--safe-b)); width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255, 255, 255, .35); border: 3px solid rgba(255, 255, 255, .7); display: none; touch-action: none;
}
#knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
body.touch #stick { display: none; }
body.touch #chatlog { display: none; }
body.touch #chatlog.open { display: block; bottom: auto; top: calc(160px + var(--safe-t)); left: 10px; right: 10px; width: auto; max-height: 40vh; }
body.touch #chatlog.open:empty { display: none; }
body.touch #act { bottom: calc(124px + var(--safe-b)); }

@media (max-height: 760px) {
  .card { padding: 14px 18px 12px; }
  .card h1 { font-size: 1.6rem; }
  #preview { width: 150px; max-width: 45%; }
  .field { margin: 7px 0; }
  .primary { margin-top: 10px; padding: 12px; }
  .ghost { margin-top: 6px; padding: 6px; }
}

@media (max-width: 520px) {
  #minimap { width: 110px; height: 73px; }
  #toasts { top: calc(150px + var(--safe-t)); }
  .emotes button { width: 34px; height: 34px; font-size: 1.2rem; }
  .pill { font-size: .78rem; padding: 6px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .act { animation: none; }
  .toast { animation: none; }
}

/* =========================================================
   Meong City — HUD, modal, judul
   ========================================================= */
.statcard {
  position: absolute; top: calc(10px + var(--safe-t)); left: calc(10px + var(--safe-l)); width: 222px; display: flex; gap: 10px;
  padding: 9px 12px 9px 8px; border-radius: 22px; pointer-events: none !important;
  background: linear-gradient(180deg, rgba(255, 250, 238, .96), rgba(255, 238, 208, .94));
  border: 3px solid #fff; box-shadow: 0 6px 0 rgba(120, 70, 20, .25), 0 10px 24px rgba(40, 20, 0, .28);
}
.sav { position: relative; width: 58px; height: 62px; flex: none; }
.sav canvas { width: 58px; height: 58px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #fff8e0, #ffd9a0); border: 2px solid #e9b36c; }
.lvbadge {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); background: linear-gradient(#ff9d3c, #e9701a); color: #fff;
  font-size: .68rem; font-weight: 900; padding: 1px 8px; border-radius: 999px; border: 2px solid #fff; white-space: nowrap;
}
.scol { flex: 1; min-width: 0; }
.sname { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #5a3510; }
.xpbar { height: 7px; border-radius: 99px; background: rgba(120, 70, 20, .18); margin: 3px 0 5px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5ac8fa, #2f7fd8); border-radius: 99px; transition: width .5s cubic-bezier(.3, 1.2, .4, 1); }
.srow2 { display: flex; gap: 6px; margin-bottom: 4px; }
.chip2 { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .9); border: 2px solid #f1d29f; border-radius: 999px; padding: 1px 9px 1px 6px; font-size: .86rem; color: #5a3510; }
.chip2 b { font-variant-numeric: tabular-nums; }
#hCoinBox.pulse { animation: coinpulse .5s ease-out; }
@keyframes coinpulse { 0% { transform: scale(1); } 30% { transform: scale(1.18); filter: brightness(1.25); } 100% { transform: scale(1); } }
.meter { display: flex; align-items: center; gap: 5px; font-size: .78rem; margin-top: 2px; }
.meter .mbar { flex: 1; height: 9px; border-radius: 99px; background: rgba(120, 70, 20, .18); overflow: hidden; }
.meter .mbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffd93d, #ffb300); border-radius: 99px; transition: width .4s; }
.meter.food .mbar i { background: linear-gradient(90deg, #ff9a7a, #ef5a3c); }
.meter em { font-style: normal; font-weight: 800; width: 24px; text-align: right; color: #5a3510; font-variant-numeric: tabular-nums; }
.meter.low .mbar i { animation: lowblink .7s infinite alternate; }
@keyframes lowblink { to { opacity: .35; } }

.questcard {
  position: absolute; top: calc(144px + var(--safe-t)); left: calc(10px + var(--safe-l)); width: 222px; padding: 7px 12px; border-radius: 16px;
  background: rgba(43, 52, 69, .86); color: #fff; font-size: .78rem; line-height: 1.3; pointer-events: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.questcard b { display: inline-block; background: #f29a3a; color: #fff; border-radius: 6px; padding: 0 6px; margin-right: 6px; font-size: .7rem; }

.dock { position: absolute; right: calc(10px + var(--safe-r)); top: calc(188px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; }
.dockbtn {
  position: relative; width: 58px; height: 58px; border-radius: 18px; border: 3px solid #fff; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fff6e2, #ffe3b0); box-shadow: 0 4px 0 rgba(140, 80, 20, .35), 0 6px 14px rgba(0, 0, 0, .22); transition: transform .12s;
}
.dockbtn span { font-size: 1.45rem; line-height: 1; }
.dockbtn small { font-size: .62rem; font-weight: 800; color: #7a4a14; margin-top: 2px; }
.dockbtn:hover { transform: translateY(-2px) scale(1.04); }
.dockbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(140, 80, 20, .35); }
.badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 99px; background: #e53935; color: #fff; font-style: normal; font-size: .75rem; font-weight: 900; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; animation: badgepulse 1.2s infinite; }
@keyframes badgepulse { 50% { transform: scale(1.18); } }
body.in-room #minimap { display: none; }
body.in-room .dock { top: calc(76px + var(--safe-t)); }
body.in-room .iconbtns { margin-top: 0; }

.roomname {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%); padding: 12px 34px; border-radius: 20px; pointer-events: none !important; white-space: nowrap;
  font-size: clamp(1.4rem, 4.5vw, 2.4rem); font-weight: 900; color: #fff6dc; letter-spacing: .03em; opacity: 0;
  background: linear-gradient(180deg, rgba(120, 66, 22, .92), rgba(84, 44, 12, .92)); border: 4px solid #f5cf8a; box-shadow: 0 8px 0 rgba(40, 20, 0, .35), 0 0 40px rgba(255, 190, 90, .35);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.roomname.show { animation: roomname 2.6s ease-out forwards; }
@keyframes roomname { 0% { opacity: 0; transform: translate(-50%, -30px) scale(.8); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 22% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -12px); } }

.ping { color: var(--soft); font-weight: 600; }
body.titling #hud > *:not(#toasts) { opacity: 0; pointer-events: none; }
#hud > * { transition: opacity .8s; }

.flycoin { position: fixed; z-index: 400; font-size: 1.5rem; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.poptext { position: fixed; z-index: 410; transform: translate(-50%, 0); font-weight: 900; font-size: 1.5rem; color: #fff; pointer-events: none; text-shadow: 0 2px 0 rgba(60, 35, 10, .9), 0 0 10px rgba(0, 0, 0, .4); animation: poptext 1.2s ease-out forwards; }
.poptext.gold { color: #ffd84a; } .poptext.blue { color: #8fd3ff; font-size: 1.1rem; } .poptext.red { color: #ff8a80; }
@keyframes poptext { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }

/* ---------- modal ---------- */
#modalRoot { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200; pointer-events: none; }
.mback { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(20, 10, 30, 0); pointer-events: auto; transition: background .2s; touch-action: manipulation; }
.mback.in { background: rgba(20, 10, 30, .58); }
.mback.out { background: rgba(20, 10, 30, 0); }
.mback.sheet { align-items: flex-end; background: transparent; }
.mback.sheet.in { background: rgba(20, 10, 30, .18); backdrop-filter: none; }
.mcard {
  width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; border-radius: 26px; border: 4px solid #fff;
  background: linear-gradient(180deg, #fffaf0, #ffecc9); box-shadow: 0 8px 0 rgba(120, 70, 20, .3), 0 24px 60px rgba(0, 0, 0, .45);
  transform: translateY(24px) scale(.94); opacity: 0; transition: transform .28s cubic-bezier(.2, 1.3, .4, 1), opacity .2s; touch-action: pan-y; color: #4a2d0c;
}
.mback.in .mcard { transform: none; opacity: 1; }
.mback.out .mcard { transform: translateY(16px) scale(.96); opacity: 0; }
.mhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px 20px; background: linear-gradient(180deg, #ffb957, #f29a3a); color: #fff; }
.mhead h2 { margin: 0; font-size: 1.25rem; text-shadow: 0 2px 0 rgba(120, 60, 0, .45); }
.mclose { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; background: #e8604c; color: #fff; font-weight: 900; padding: 0; box-shadow: 0 3px 0 rgba(100, 20, 10, .4); }
.mbody { padding: 16px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mbody h3 { margin: 14px 0 8px; font-size: 1rem; color: #a85a00; }
.desc { color: #7a5a3a; font-size: .92rem; white-space: pre-line; margin-bottom: 8px; }
.empty { text-align: center; color: #9a7a55; padding: 22px 10px; }
.mbody .primary { margin-top: 12px; }
.mbody .primary.big { padding: 16px; font-size: 1.2rem; }
.mbody .ghost { width: auto; margin: 0; padding: 8px 14px; background: #fff; border: 2px solid #e8c88e; border-radius: 12px; text-decoration: none; color: #7a4a14; font-weight: 800; }
.mbody .ghost.small, .mbody .primary.small { padding: 6px 12px; font-size: .88rem; margin: 0; border-radius: 12px; box-shadow: 0 3px 0 var(--accent-dark); width: auto; }
.mbody .ghost.small { box-shadow: 0 3px 0 #e0c08a; }
.mbody button:disabled { opacity: .55; filter: grayscale(.4); }

.shoptop { display: flex; gap: 14px; align-items: center; }
.shoppic { width: 92px; height: 92px; flex: none; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; background: radial-gradient(circle at 50% 35%, #fff, #ffe0a8); border: 3px solid #f1c887; animation: floaty 2.4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-5px) rotate(-3deg); } }
.shopinfo .kind { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #c78a3a; }
.shopinfo .desc { margin: 4px 0; } .shopinfo .have { font-weight: 800; color: #6a8f3a; }
.qtyrow { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 4px; }
.qbtn { width: 48px; height: 48px; border-radius: 16px; border: 3px solid #fff; background: #ffd08a; color: #7a4a14; font-size: 1.6rem; font-weight: 900; box-shadow: 0 4px 0 #d9a35a; padding: 0; }
.qbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9a35a; }
.qmax { padding: 0 14px; height: 48px; border-radius: 16px; border: 3px solid #fff; background: #bfe3ff; color: #1f5a96; font-weight: 900; box-shadow: 0 4px 0 #8fbde8; }
.qnum { min-width: 72px; text-align: center; font-size: 1.9rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.total { text-align: center; margin-top: 10px; font-weight: 800; color: #6a4a1a; }
.total.poor { color: #d9534f; } .total.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.baggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
.bcell { position: relative; aspect-ratio: 1; border-radius: 16px; border: 3px solid #f1d29f; background: #fff; font-size: 2rem; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .12s; }
.bcell:hover { transform: scale(1.06); }
.bcell.on { border-color: #f29a3a; background: #fff4e0; box-shadow: 0 0 0 3px rgba(242, 154, 58, .3); }
.bcell.worn::after { content: ''; position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; background: #4caf50 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; border: 2px solid #fff; }
.bq { position: absolute; right: 4px; bottom: 2px; font-size: .72rem; font-weight: 900; background: rgba(255, 255, 255, .9); border-radius: 8px; padding: 0 4px; color: #7a4a14; }
.bn { font-size: .62rem; font-weight: 800; line-height: 1.1; margin-top: 2px; color: #7a4a14; }
.bagdetail { margin-top: 14px; min-height: 70px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .6); }
.dname { font-weight: 900; font-size: 1.05rem; } .ddesc { color: #7a5a3a; font-size: .88rem; white-space: pre-line; margin: 4px 0; }
.dacts { display: flex; gap: 8px; margin-top: 6px; }

.srow { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px dashed #e8c88e; }
.srow .se { font-size: 1.6rem; } .srow .sn { flex: 1; font-weight: 700; }
.selllist { max-height: 46vh; overflow-y: auto; }
.sellfoot { margin-top: 6px; }

.tsec { background: rgba(255, 255, 255, .6); border-radius: 18px; padding: 10px 14px 12px; margin-bottom: 12px; }
.tsec h3 { margin: 2px 0 8px; }
.tt { font-weight: 800; } .td { color: #7a5a3a; font-size: .86rem; } .td.dim { margin-top: 6px; opacity: .8; } .tr { margin-top: 4px; font-weight: 800; color: #a85a00; font-size: .88rem; } .tprog { margin-top: 6px; font-size: .78rem; color: #9a7a55; }
.drow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e8c88e; } .drow.claimed { opacity: .55; }
.dl { flex: 1; min-width: 0; } .pbar { height: 8px; border-radius: 99px; background: #f1dfbd; margin: 4px 0; overflow: hidden; } .pfill { height: 100%; background: linear-gradient(90deg, #7fd36e, #3fae4a); border-radius: 99px; transition: width .4s; }

.dlg { width: min(720px, 100%); margin-bottom: calc(26px + var(--safe-b)); border-radius: 24px; }
.dlg .mbody { padding: 14px 18px 16px; }
.dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dava { font-size: 2.2rem; width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 3px solid #f1c887; display: flex; align-items: center; justify-content: center; }
.dwho { font-weight: 900; font-size: 1.1rem; color: #a85a00; }
.dtext { min-height: 3.2em; font-size: 1.05rem; line-height: 1.5; }
.dchoices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dchoice { padding: 9px 16px; border-radius: 14px; border: 3px solid #fff; background: #ffd08a; color: #6a3a0a; font-weight: 800; box-shadow: 0 3px 0 #d9a35a; }

/* memancing */
.fscene { position: relative; height: 190px; border-radius: 20px; overflow: hidden; background: linear-gradient(#bfe8ff, #e9f7ff 45%); border: 3px solid #fff; }
.fwater { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: linear-gradient(#5bb8e8, #2b86bd); overflow: hidden; }
.wave { position: absolute; left: -50%; width: 200%; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .28); animation: wave 4s linear infinite; }
.wave.w1 { top: 10px; } .wave.w2 { top: 44px; animation-duration: 6s; animation-direction: reverse; opacity: .6; }
@keyframes wave { to { transform: translateX(25%); } }
.fbob { position: absolute; left: 50%; top: 20px; font-size: 2rem; transform: translateX(-50%); transition: top .5s cubic-bezier(.3, 1.4, .5, 1); }
.fbob.cast { top: 98px; animation: bobfloat 1.4s ease-in-out infinite .5s; }
.fbob.bite { top: 98px; animation: bobbite .18s linear infinite; }
.fbob.reel { top: 98px; animation: bobbite .12s linear infinite; }
@keyframes bobfloat { 50% { transform: translateX(-50%) translateY(5px); } }
@keyframes bobbite { 50% { transform: translateX(-50%) translateY(10px); } }
.fmsg { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-weight: 800; color: #1f5a7a; text-shadow: 0 1px 0 #fff; padding: 0 10px; }
.fmsg.hot { color: #d9302c; animation: hotpulse .3s infinite alternate; } @keyframes hotpulse { to { transform: scale(1.08); } }
.fcatch { position: absolute; left: 50%; top: 40%; font-size: 4rem; transform: translate(-50%, -50%); animation: catch 1.7s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes catch { 0% { opacity: 0; transform: translate(-50%, 60px) scale(.3); } 30% { opacity: 1; transform: translate(-50%, -40px) scale(1.4) rotate(-12deg); } 100% { opacity: 0; transform: translate(-50%, -80px) scale(1) rotate(8deg); } }
.ftrack { position: relative; height: 34px; margin: 12px 0 4px; border-radius: 99px; background: #e9dcc4; border: 3px solid #fff; overflow: hidden; }
.fzone { position: absolute; top: 0; bottom: 0; background: linear-gradient(#7fe08a, #3fb54b); } .fmark { position: absolute; top: -2px; bottom: -2px; width: 8px; margin-left: -4px; background: #d9302c; border-radius: 4px; box-shadow: 0 0 8px rgba(217, 48, 44, .7); }
.fbait { display: block; margin: 8px 0 0; font-size: .88rem; font-weight: 700; } .fbait.dis { opacity: .5; }
.fstats { text-align: center; margin-top: 10px; font-size: .8rem; color: #9a7a55; }

/* kuis */
.qmeta { font-size: .8rem; font-weight: 800; color: #a85a00; margin-bottom: 8px; } .qtext { font-size: 1.2rem; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.qopts { display: grid; gap: 8px; }
.qopt { text-align: left; padding: 12px 14px; border-radius: 14px; border: 3px solid #fff; background: #fff; color: #4a2d0c; font-weight: 700; box-shadow: 0 3px 0 #e0c08a; }
.qopt:hover { background: #fff4e0; } .qopt.good { background: #c8f2c8; box-shadow: 0 3px 0 #7fcf7f; } .qopt.bad { background: #ffd0cc; box-shadow: 0 3px 0 #e8928c; animation: shake .4s; }
.qfb { margin-top: 12px; padding: 10px 12px; border-radius: 14px; font-size: .92rem; } .qfb.good { background: #e3f8e0; } .qfb.bad { background: #ffe6e3; }
.qrow { display: flex; gap: 10px; margin-top: 12px; align-items: center; } .qrow .primary { margin-top: 0; flex: 1; }

/* barista */
.bcust { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.bshow { height: 120px; border-radius: 20px; background: #fff; border: 3px solid #f1d29f; display: flex; align-items: center; justify-content: center; font-size: 4.4rem; font-weight: 800; }
.bshow.flash { animation: bflash .7s ease-out; } @keyframes bflash { 0% { transform: scale(.4); opacity: 0; } 40% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
.bprog { min-height: 2.2rem; text-align: center; font-size: 1.6rem; margin: 6px 0; letter-spacing: .15em; }
.bpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .bpad.dis { opacity: .45; pointer-events: none; }
.bing { padding: 14px 0; font-size: 2.2rem; border-radius: 18px; border: 3px solid #fff; background: #ffe0b0; box-shadow: 0 4px 0 #d9a35a; }
.bing:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9a35a; }
.bres { text-align: center; font-weight: 900; margin-top: 12px; font-size: 1.1rem; } .bres.good { color: #3fa04a; } .bres.bad { color: #d9534f; }

/* bola benang */
.yarena { position: relative; height: 260px; border-radius: 20px; background: repeating-linear-gradient(45deg, #fff4e0, #fff4e0 16px, #ffecc9 16px, #ffecc9 32px); border: 3px solid #fff; overflow: hidden; touch-action: manipulation; }
.yhud { font-weight: 900; text-align: center; margin: 10px 0 8px; }
.yball { position: absolute; width: 64px; height: 64px; border: 0; background: transparent; font-size: 3rem; padding: 0; transition: left .25s cubic-bezier(.3, 1.5, .5, 1), top .25s cubic-bezier(.3, 1.5, .5, 1); animation: yroll 1.1s linear infinite; }
@keyframes yroll { to { transform: rotate(360deg); } }
.yspark { position: absolute; pointer-events: none; font-weight: 900; color: #e9701a; animation: ypop .6s ease-out forwards; } @keyframes ypop { to { transform: translateY(-34px) scale(1.4); opacity: 0; } }
.yres { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.3rem; text-align: center; padding: 10px; }

/* perayaan */
.celebrate { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 500; text-align: center; pointer-events: none; animation: celin .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.celebrate.out { animation: celout .4s ease-in forwards; }
.cbadge { font-size: 5rem; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); animation: spinpop 1s ease-out; }
.ctitle { font-size: clamp(2rem, 8vw, 3.4rem); font-weight: 900; color: #ffe27a; -webkit-text-stroke: 2px #7a3a00; paint-order: stroke fill; text-shadow: 0 6px 0 #7a3a00, 0 0 30px rgba(255, 200, 60, .8); }
.csub { font-size: 1.2rem; font-weight: 800; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); margin: 4px 0; max-width: 80vw; }
.cline { display: inline-block; margin: 4px 4px 0; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #7a4a14; font-weight: 800; }
@keyframes celin { from { opacity: 0; transform: translate(-50%, -50%) scale(.3); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes celout { to { opacity: 0; transform: translate(-50%, -70%) scale(.9); } }
@keyframes spinpop { from { transform: rotate(-200deg) scale(.2); } to { transform: none; } }

/* ---------- judul sinematik ---------- */
.title { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: radial-gradient(ellipse at center, rgba(12, 6, 36, .1), rgba(12, 6, 36, .82) 85%); opacity: 0; }
.title.show { animation: tfade 5s ease-in-out forwards; }
.title.out { animation: tout .8s forwards; }
@keyframes tfade { 0% { opacity: 0; } 10% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tout { from { opacity: 1; } to { opacity: 0; } }
.tglow { position: absolute; left: 50%; top: 50%; width: 120vmin; height: 120vmin; margin: -60vmin; background: conic-gradient(from 0deg, transparent, rgba(255, 200, 90, .22), transparent 25%, rgba(255, 150, 90, .18), transparent 55%, rgba(255, 220, 120, .2), transparent 80%); border-radius: 50%; animation: tspin 9s linear infinite; mask-image: radial-gradient(circle, #000 20%, transparent 68%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%); }
@keyframes tspin { to { transform: rotate(360deg); } }
.tmain { position: relative; margin: 0; font-size: clamp(3.2rem, 15vw, 9rem); line-height: .95; font-weight: 900; letter-spacing: .04em; display: flex; flex-wrap: wrap; gap: .18em; justify-content: center; }
.tw {
  display: inline-block; background: linear-gradient(180deg, #fff6c8 0%, #ffd34d 45%, #f08a1c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 .06em 0 #8a3f08) drop-shadow(0 0 .3em rgba(255, 170, 60, .7)); animation: tin 1.5s cubic-bezier(.2, 1.3, .3, 1) both;
}
.tw2 { animation-delay: .35s; background-image: linear-gradient(180deg, #ffffff 0%, #ffb8d2 45%, #ee5b92 100%); filter: drop-shadow(0 .06em 0 #7a1f4a) drop-shadow(0 0 .3em rgba(255, 110, 170, .7)); }
@keyframes tin { 0% { opacity: 0; transform: scale(2.6) translateY(-40px) rotate(-6deg); letter-spacing: .5em; filter: blur(16px); } 60% { opacity: 1; transform: scale(.95); filter: blur(0); } 100% { opacity: 1; transform: none; letter-spacing: .04em; } }
.tby { position: relative; margin: 16px 0 0; font-size: clamp(1rem, 3.6vw, 1.7rem); color: #fff; letter-spacing: .12em; text-transform: uppercase; opacity: 0; animation: tby 1.2s ease-out 1.5s forwards; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.tby b { color: #ffd34d; letter-spacing: .1em; }
@keyframes tby { from { opacity: 0; transform: translateY(24px); letter-spacing: .5em; } to { opacity: 1; transform: none; } }
.thint { position: absolute; bottom: calc(40px + var(--safe-b)); margin: 0; font-size: .8rem; color: rgba(255, 255, 255, .6); opacity: 0; animation: tby 1s ease-out 2.4s forwards; }
.tpaws { position: absolute; left: 0; right: 0; bottom: 18%; height: 40px; pointer-events: none; }
.tpaws i { position: absolute; font-style: normal; font-size: 2rem; opacity: 0; animation: paw 3.4s ease-out forwards; }
.tpaws i:nth-child(1) { left: 12%; bottom: 0; animation-delay: .2s; transform: rotate(70deg); } .tpaws i:nth-child(2) { left: 28%; bottom: 24px; animation-delay: .6s; transform: rotate(80deg); }
.tpaws i:nth-child(3) { left: 46%; bottom: 0; animation-delay: 1s; transform: rotate(75deg); } .tpaws i:nth-child(4) { left: 64%; bottom: 24px; animation-delay: 1.4s; transform: rotate(80deg); }
.tpaws i:nth-child(5) { left: 82%; bottom: 0; animation-delay: 1.8s; transform: rotate(70deg); }
@keyframes paw { 0% { opacity: 0; } 15% { opacity: .85; } 100% { opacity: 0; } }
#flash { position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }

@media (max-width: 760px) {
  .statcard, .questcard { width: 190px; } .statcard { padding: 7px 8px 7px 6px; gap: 6px; } .sav { width: 48px; height: 54px; } .sav canvas { width: 48px; height: 48px; }
  .questcard { top: 134px; font-size: .7rem; }
  .dock { top: 150px; } .dockbtn { width: 50px; height: 50px; border-radius: 15px; } .dockbtn span { font-size: 1.25rem; }
  body.in-room .dock { top: calc(60px + var(--safe-t)); }
  #toasts { top: calc(200px + var(--safe-t)); }
  .mhead h2 { font-size: 1.1rem; }
}
@media (max-height: 520px) {
  .questcard { display: none; } .mcard { max-height: calc(100vh - 16px); } .dock { top: 140px; flex-direction: row; right: 10px; top: auto; bottom: calc(24px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
  .tw, .tglow, .tpaws i, .shoppic, .fbob, .wave, .celebrate, .yball, .badge { animation: none !important; }
  .tw, .tby, .thint { opacity: 1; }
}



/* =========================================================
   v3 — tata letak HUD simetris (kolom kiri / tengah / kanan),
   akun, profil, admin, pengaturan, mandi & bersih-bersih, PWA
   ========================================================= */
:root { --col: 216px; --gap: 8px; }
.col { position: absolute; top: calc(10px + var(--safe-t)); width: var(--col); display: flex; flex-direction: column; gap: var(--gap); pointer-events: none; }
.col > * { pointer-events: auto; }
.colL { left: calc(10px + var(--safe-l)); }
.colR { right: calc(10px + var(--safe-r)); }
.statcard, .questcard { position: relative; top: auto; left: auto; width: 100%; pointer-events: none !important; }
.questcard { text-align: left; }
#minimap { width: 100%; height: auto; aspect-ratio: 3 / 2; display: block; }
.iconbtns { display: flex; justify-content: space-between; gap: 4px; }
.round { position: relative; --rb: min(38px, calc((var(--col) - 16px) / 5)); width: var(--rb); height: var(--rb); flex: none; font-size: calc(var(--rb) * .46); border: 2px solid #fff; }
.round .badge { top: -5px; right: -5px; min-width: 18px; height: 18px; font-size: .65rem; }
.dock { position: static; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dockbtn { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 14px; border-width: 2px; }
.dockbtn span { font-size: 1.25rem; }
.dockbtn small { font-size: .55rem; }
body.in-room .dock { top: auto; }

.colC { position: absolute; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: calc(100vw - 2 * var(--col) - 48px); max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: var(--gap); pointer-events: none !important; }
.colC > * { pointer-events: none !important; }
.pill { position: static; transform: none; white-space: normal; text-align: center; max-width: 100%; line-height: 1.5; }
#notices { position: static; width: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--gap); transition: opacity .25s; }
.roomname, .banner, #toasts { position: static; transform: none; }
#toasts { width: 100%; align-items: center; }
.roomname { padding: 8px 26px; border-width: 3px; font-size: clamp(1.1rem, 3vw, 1.7rem); text-align: center; }
.roomname.show { animation: roomname2 2.6s ease-out forwards; }
@keyframes roomname2 { 0% { opacity: 0; transform: translateY(-24px) scale(.85); } 14% { opacity: 1; transform: translateY(0) scale(1.05); } 22% { transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.banner { text-align: center; }
.toast { max-width: 100%; text-align: center; }
body.celebrating #notices { opacity: 0; }
body.titling #hud > *:not(#hudC) { opacity: 0; pointer-events: none; }
body.titling #info { opacity: 0; }

.celebrate { top: 42%; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; width: min(92vw, 560px); text-align: center; z-index: 500; }
.celebrate .cbadge, .celebrate .ctitle, .celebrate .csub { flex: 0 0 100%; }
.cline { margin: 3px 4px 0; }
.meter.clean .mbar i { background: linear-gradient(90deg, #8fe3ff, #3aa7e8); }

/* tombol aksi tidak menimpa joystick / emote */
.act { white-space: nowrap; max-width: 92vw; }
body.touch #act { left: auto; right: calc(14px + var(--safe-r)); bottom: calc(250px + var(--safe-b)); transform: none; animation: none; }


/* ---------- layar masuk: lebih hidup ---------- */
.screen { background: radial-gradient(ellipse at 20% 10%, rgba(255, 236, 190, .7), transparent 55%), radial-gradient(ellipse at 85% 85%, rgba(160, 220, 255, .7), transparent 55%), linear-gradient(160deg, rgba(227, 243, 248, .55), rgba(255, 240, 220, .8)); }
body:not(.playing) .screen { padding-bottom: calc(60px + var(--safe-b)); }
.screen::before, .screen::after { content: ''; width: 7rem; height: 7rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%238a5a2b'%3E%3Cellipse cx='32' cy='42' rx='15' ry='12'/%3E%3Cellipse cx='12' cy='28' rx='6' ry='8'/%3E%3Cellipse cx='25' cy='15' rx='6' ry='8'/%3E%3Cellipse cx='39' cy='15' rx='6' ry='8'/%3E%3Cellipse cx='52' cy='28' rx='6' ry='8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; position: absolute; opacity: .09; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.screen::before { left: 6%; top: 12%; transform: rotate(-24deg); }
.screen::after { right: 7%; bottom: 14%; transform: rotate(18deg); animation-delay: -6s; }
@keyframes drift { to { transform: translate(24px, -30px) rotate(10deg); } }
.card { position: relative; border: 3px solid #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 246, 228, .94)); animation: cardin .7s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes cardin { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }
.logo { background: linear-gradient(180deg, #ffb347, #e8701a 70%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(140, 60, 0, .25)); font-weight: 900; }
.card h1 span[aria-hidden] { display: inline-block; animation: wag 2.4s ease-in-out infinite; }
@keyframes wag { 50% { transform: rotate(14deg) scale(1.15); } }
.acctbox { margin: 10px 0 2px; text-align: left; }
.subnote { font-size: .78rem; color: var(--soft); line-height: 1.4; margin: 6px 0; }
.memberbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 14px; background: #fff4e3; border: 2px solid #f1d29f; }
.minfo { display: flex; flex-direction: column; min-width: 0; color: #5a3510; }
.minfo b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.minfo span { font-size: .78rem; color: var(--soft); }
.linkbtn { border: 0; background: transparent; color: #2f7fd8; font-weight: 800; text-decoration: underline; padding: 6px; }
body.is-member #name, body.is-member .card > .field { display: none; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(120, 70, 20, .09); }
.tabs.wrap { flex-wrap: wrap; margin-bottom: 8px; }
.tab { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; font-weight: 800; font-size: .88rem; color: #7a4a14; white-space: nowrap; }
.tab.on { background: #fff; box-shadow: 0 2px 6px rgba(120, 70, 20, .22); color: #d97f1c; }
.tab.refresh { flex: 0 0 40px; }
.acctform { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.acctform input, .pedit input, .asearch, .apw { width: 100%; padding: 11px 14px; font-size: 1rem; border-radius: 14px; border: 2px solid #d4dde5; background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
.acctform input:focus, .pedit input:focus, .asearch:focus, .apw:focus { border-color: var(--accent); }
.acctform .primary { margin-top: 2px; }
.acctform .status { margin: 0; text-align: center; }
#acctBox + .field { margin-top: 8px; }

/* ---------- pengaturan ---------- */
.maprow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #ecd2a4; }
.maplabel { flex: 1; font-weight: 700; font-size: .92rem; }
.mapkey { min-width: 66px; padding: 8px 10px; border-radius: 10px; border: 2px solid #e8c88e; background: #fff; font-weight: 800; color: #7a4a14; box-shadow: 0 3px 0 #e0c08a; }
.mapkey.wait { background: #fff3cd; animation: lowblink .6s infinite alternate; }
.maprow input[type=range] { width: 130px; }
.padstate { padding: 8px 12px; border-radius: 12px; background: #f3e9d9; font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.padstate.on { background: #dff5df; color: #226b2a; }
.desc.dim { color: #a58a66; font-size: .8rem; }
.settings .ghost.small { margin-top: 12px; }
.padfocus { outline: 3px solid #2f7fd8 !important; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(47, 127, 216, .25) !important; }

/* ---------- profil ---------- */
.profile { width: min(520px, 100%); }
.ptop { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 20px; background: radial-gradient(circle at 30% 30%, #fff8e0, #ffd9a0); border: 3px solid #fff; box-shadow: inset 0 0 0 2px #f1c887; }
.pcat { width: 132px; height: auto; flex: none; }
.pwho { flex: 1; min-width: 0; text-align: left; }
.pname { font-size: 1.5rem; font-weight: 900; color: #5a3510; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptitle { font-weight: 800; color: #c76a0c; font-size: .9rem; margin: 2px 0 6px; }
.ptags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.ptag { padding: 2px 10px; border-radius: 99px; background: #fff; border: 2px solid #f1d29f; font-size: .75rem; font-weight: 800; color: #7a4a14; }
.ptag.member { background: #e3f4ff; border-color: #9fd3f3; color: #1d5f8e; }
.pxp small { font-size: .72rem; color: #7a5a3a; font-weight: 700; }
.pwho .ghost.small { margin-top: 6px; }
.pedit { margin-top: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 2px dashed #e8c88e; }
.pedit .field { margin: 8px 0; }
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.pstat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #fff; border: 2px solid #f1d29f; min-width: 0; }
.pstat .pi { font-size: 1.5rem; }
.pstat b { display: block; font-size: 1.05rem; color: #5a3510; font-variant-numeric: tabular-nums; }
.pstat small { color: #8a6a44; font-size: .72rem; font-weight: 700; }
.pmeters { display: grid; gap: 6px; margin-top: 12px; }
.pmeter { display: grid; grid-template-columns: 128px 1fr 32px; align-items: center; gap: 8px; font-size: .82rem; font-weight: 800; color: #5a3510; }
.pmeter .mbar { height: 10px; border-radius: 99px; background: rgba(120, 70, 20, .16); overflow: hidden; }
.pmeter .mbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd93d, #ffb300); border-radius: 99px; }
.pmeter.food .mbar i { background: linear-gradient(90deg, #ff9a7a, #ef5a3c); }
.pmeter.clean .mbar i { background: linear-gradient(90deg, #8fe3ff, #3aa7e8); }
.pmeter.tidy .mbar i { background: linear-gradient(90deg, #b7e48a, #6cbb3a); }
.pmeter em { font-style: normal; text-align: right; }
.hlist { max-height: 210px; overflow-y: auto; border-radius: 14px; background: #fff; border: 2px solid #f1d29f; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid #f6e6c8; }
.hrow:last-child { border-bottom: 0; }
.hic { font-size: 1.2rem; }
.htx { display: flex; flex-direction: column; min-width: 0; font-size: .86rem; font-weight: 700; }
.htx small { color: #a58a66; font-weight: 600; font-size: .7rem; }
.hempty { padding: 16px; text-align: center; color: #a58a66; }
.pfoot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.pfoot .primary.small, .pfoot .ghost.small { margin-top: 0; }
.danger { color: #c0392b !important; border-color: #f0b3a9 !important; }

/* ---------- admin ---------- */
.admin { width: min(620px, 100%); }
.asum { font-size: .8rem; color: #8a6a44; font-weight: 700; margin: 8px 2px; }
.alist { display: flex; flex-direction: column; gap: 8px; max-height: min(52vh, 440px); overflow-y: auto; }
.arow { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 16px; background: #fff; border: 2px solid #f1d29f; flex-wrap: wrap; }
.adot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #e0c08a; flex: none; }
.ainfo { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.ainfo small { color: #8a6a44; font-size: .72rem; font-weight: 600; }
.aname { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.astatus { padding: 1px 9px; border-radius: 99px; font-size: .68rem; font-weight: 900; color: #fff; background: #8a8a8a; }
.st-pending { background: #f0a020; } .st-active { background: #3aa655; } .st-disabled { background: #d9534f; } .st-rejected { background: #7a6a6a; }
.aacts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.apw { width: 150px; padding: 6px 10px; }
.asearch { margin-bottom: 4px; }

/* ---------- mandi & bersih-bersih ---------- */
.barena { position: relative; height: 260px; border-radius: 20px; overflow: hidden; touch-action: none; cursor: pointer; background: radial-gradient(circle at 50% 60%, #e4f6ff, #9fd8f5 70%); border: 3px solid #fff; box-shadow: inset 0 0 0 2px #9fd0ea; }
.bcat { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 7.5rem; filter: drop-shadow(0 8px 6px rgba(0, 60, 100, .25)); pointer-events: none; animation: bwiggle 1.6s ease-in-out infinite; }
@keyframes bwiggle { 50% { transform: translate(-50%, -52%) rotate(3deg); } }
.bdirt { position: absolute; left: 36%; top: 40%; font-size: 3rem; pointer-events: none; }
.bdirt.d2 { left: 58%; top: 54%; font-size: 3.6rem; }
.bub { position: absolute; font-size: 1.7rem; transform: translate(-50%, -50%); pointer-events: none; animation: bubup .9s ease-out forwards; }
@keyframes bubup { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -150%) scale(1.3); } }
.barena.rinse::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(120, 200, 255, .75), rgba(200, 240, 255, .2)); animation: rinse 1s ease-in forwards; }
@keyframes rinse { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
.carena { position: relative; height: 270px; border-radius: 20px; overflow: hidden; border: 3px solid #fff; box-shadow: inset 0 0 0 2px #d9b27a; background: repeating-linear-gradient(90deg, #e6c593 0 38px, #dcb682 38px 76px); }
.dust { position: absolute; font-size: 2.3rem; background: transparent; border: 0; padding: 8px; line-height: 1; animation: dwob 1.8s ease-in-out infinite; transition: transform .1s; }
.dust:active { transform: scale(.85); }
.dust.gone { animation: dgone .3s ease-out forwards; }
@keyframes dwob { 50% { translate: 0 -4px; } }
@keyframes dgone { to { opacity: 0; transform: scale(1.6) rotate(40deg); } }

/* ---------- pasang aplikasi (PWA) ---------- */
.installbar { position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translate(-50%, 140%); z-index: 180; width: min(440px, calc(100vw - 20px)); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px; background: linear-gradient(180deg, #fffaf0, #ffe8c0); border: 3px solid #fff; box-shadow: 0 8px 0 rgba(120, 70, 20, .25), 0 14px 36px rgba(0, 0, 0, .3); transition: transform .45s cubic-bezier(.2, 1.3, .4, 1); touch-action: manipulation; }
.installbar.show { transform: translate(-50%, 0); }
.ibicon { font-size: 1.9rem; }
.ibtext { flex: 1; min-width: 0; color: #5a3510; line-height: 1.25; }
.ibtext b { display: block; font-size: .95rem; }
.ibtext small { font-size: .74rem; color: #7a5a3a; font-weight: 600; }
.installbar .primary.small { margin: 0; flex: none; padding: 9px 16px; }
.ibx { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(120, 70, 20, .12); color: #7a4a14; font-weight: 900; padding: 0; }
.foot { z-index: 5; }

/* ---------- responsif ---------- */
@media (max-width: 720px) {
  :root { --col: 152px; --gap: 6px; }
  .statcard { padding: 7px 8px 7px 6px; gap: 7px; border-width: 2px; border-radius: 18px; }
  .sav { width: 44px; height: 50px; } .sav canvas { width: 44px; height: 44px; border-radius: 12px; }
  .lvbadge { font-size: .6rem; padding: 0 6px; }
  .sname { font-size: .8rem; } .chip2 { font-size: .74rem; padding: 0 6px 0 4px; }
  .meter { font-size: .68rem; gap: 3px; } .meter em { width: 20px; }
  .questcard { font-size: .7rem; padding: 6px 9px; }
  .round { border-width: 1px; }
  .iconbtns { gap: 3px; }
  .colC { width: min(94vw, 420px); top: calc(var(--ctop, 220px) + var(--safe-t)); }
  .pill { font-size: .72rem; padding: 5px 10px; }
  body .dock, body.in-room .dock { position: fixed; top: auto; right: calc(10px + var(--safe-r)); bottom: calc(116px + var(--safe-b)); width: 54px; display: flex; flex-direction: column; gap: 8px; }
  .dockbtn { width: 54px; height: 54px; aspect-ratio: auto; }
  .dockbtn span { font-size: 1.4rem; } .dockbtn small { font-size: .56rem; }
  body.touch #act { bottom: calc(250px + var(--safe-b)); right: calc(74px + var(--safe-r)); }
  .pmeter { grid-template-columns: 104px 1fr 28px; }
  .pcat { width: 104px; } .pname { font-size: 1.2rem; }
  .pgrid { grid-template-columns: 1fr 1fr; }
  .mapkey { min-width: 56px; }
}
@media (max-height: 520px) {
  :root { --col: 176px; }
  #minimap { display: none; }
  .colC { width: calc(100vw - 2 * var(--col) - 40px); top: calc(10px + var(--safe-t)); }
  body .dock, body.in-room .dock { position: static; bottom: auto; width: auto; display: grid; grid-template-columns: repeat(4, 1fr); }
  .dockbtn { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .questcard { display: none; }
  body.touch #act { bottom: calc(124px + var(--safe-b)); right: calc(14px + var(--safe-r)); }
  .celebrate { top: 46%; } .cbadge { font-size: 3rem; }
  .card { padding: 12px 16px; }
  .pgrid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 721px) and (max-width: 940px) { :root { --col: 190px; } }
@media (prefers-reduced-motion: reduce) {
  .screen::before, .screen::after, .card, .card h1 span[aria-hidden], .bcat, .dust, .mapkey.wait { animation: none !important; }
  .installbar { transition: none; }
}

body.playing .installbar { display: none !important; }


/* ===== v4: ikon eksklusif ===== */
.ico { width: 1.25em; height: 1.25em; vertical-align: -0.28em; display: inline-block; flex: none; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.ic { display: inline-flex; align-items: center; justify-content: center; font-style: normal; line-height: 1; flex: none; }
.ic .ico { margin: 0; vertical-align: middle; }
.round .ico, .dockbtn .ico { width: 1.35em; height: 1.35em; }
.tpaws .ic { display: inline-block; }
button .ico { vertical-align: -0.3em; }

/* kolom sandi + tombol mata */
.pwwrap { position: relative; display: block; width: 100%; }
.pwwrap input { width: 100%; padding-right: 48px; }
.pweye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; padding: 0; }
.pweye:hover, .pweye:focus-visible { background: rgba(120,80,30,.12); outline: none; }
.pweye .ico { width: 22px; height: 22px; margin: 0; }
.acctform .pwwrap { margin: 0; }

.mclose { display: grid; place-items: center; flex: none; }
.mclose .ico { width: 16px; height: 16px; margin: 0; filter: brightness(0) invert(1); }

/* ===== v4: tampilan dapat diatur ===== */
body.h-stats #stats, body.h-quest #quest, body.h-info #info, body.h-minimap #minimap, body.h-buttons .iconbtns, body.h-dock #dock, body.h-chatlog #chatlog, body.h-hints #act { display: none !important; }
#hudL { transform: scale(calc(var(--hud-scale, 1) * var(--auto-scale, 1))); transform-origin: top left; }
#hudR { transform: scale(calc(var(--hud-scale, 1) * var(--auto-scale, 1))); transform-origin: top right; }

/* dok: 3 x 2 simetris di semua ukuran layar */
body .dock, body.in-room .dock { position: static; top: auto; right: auto; bottom: auto; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex-direction: row; }
body .dockbtn { width: 100%; height: auto; aspect-ratio: 1 / 1; min-width: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body .dockbtn small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .dockbtn span { font-size: 1.2rem; display: grid; place-items: center; }
.iconbtns { justify-content: space-between; }

/* ===== kontrol layar (analog + tombol) ===== */
:root { --vcs: 1; --vc-op: .65; }
#stick { width: calc(120px * var(--vcs)); height: calc(120px * var(--vcs)); opacity: var(--vc-op); left: calc(22px + var(--safe-l)); bottom: calc(120px + var(--safe-b)); z-index: 30; -webkit-tap-highlight-color: transparent; }
#knob { width: calc(52px * var(--vcs)); height: calc(52px * var(--vcs)); margin: calc(-26px * var(--vcs)) 0 0 calc(-26px * var(--vcs)); }
body.vc-on #stick { display: block; }
body.vc-left #stick { left: auto; right: calc(22px + var(--safe-r)); }
.vbtns { position: absolute; display: none; z-index: 30; width: calc(130px * var(--vcs)); height: calc(120px * var(--vcs)); right: calc(22px + var(--safe-r)); bottom: calc(120px + var(--safe-b)); opacity: var(--vc-op); touch-action: none; -webkit-user-select: none; user-select: none; }
body.vc-btns .vbtns { display: block; }
body.vc-left .vbtns { right: auto; left: calc(22px + var(--safe-l)); }
.vb { position: absolute; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .8); background: rgba(255, 248, 232, .55); box-shadow: 0 3px 8px rgba(0, 0, 0, .28); touch-action: none; -webkit-tap-highlight-color: transparent; transition: transform .08s, background .08s; }
.vb .ico { width: 55%; height: 55%; margin: 0; }
.vb-a .ico { width: 64%; height: 64%; }
.vb small { display: none; }
.vb.down { transform: scale(.9); background: rgba(255, 255, 255, .85); }
.vb-a { width: calc(66px * var(--vcs)); height: calc(66px * var(--vcs)); right: 0; bottom: 0; background: rgba(255, 190, 90, .7); }
.vb-s1, .vb-s2, .vb-s3 { width: calc(44px * var(--vcs)); height: calc(44px * var(--vcs)); }
.vb-s1 { left: 0; bottom: calc(6px * var(--vcs)); }
.vb-s2 { left: calc(20px * var(--vcs)); top: calc(24px * var(--vcs)); }
.vb-s3 { left: calc(72px * var(--vcs)); top: 0; }
body.vc-left .vb-a { right: auto; left: 0; } body.vc-left .vb-s1 { left: auto; right: 0; } body.vc-left .vb-s2 { left: auto; right: calc(20px * var(--vcs)); } body.vc-left .vb-s3 { left: auto; right: calc(72px * var(--vcs)); }
body.vc-on #act { left: auto; right: calc(22px + var(--safe-r)); bottom: calc(120px + 120px * var(--vcs) + 14px + var(--safe-b)); transform: none; animation: none; }
body.vc-on.vc-left #act { right: auto; left: calc(22px + var(--safe-l)); }
body.vc-on.vc-btns #act { bottom: calc(120px + 120px * var(--vcs) + 14px + var(--safe-b)); }
body.vc-on:not(.vc-btns) #act { bottom: calc(120px + 66px * var(--vcs) + 14px + var(--safe-b)); }

/* ===== pengaturan: daftar centang, segmen ===== */
.chklist { display: flex; flex-direction: column; margin: 6px 0 10px; }
.chkrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px dashed #ecd2a4; cursor: pointer; min-width: 0; }
.chkrow input { position: absolute; opacity: 0; width: 44px; height: 26px; left: 4px; margin: 0; cursor: pointer; }
.chksw { flex: none; width: 44px; height: 26px; border-radius: 99px; background: #cdbfa8; position: relative; transition: background .15s; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .18); }
.chksw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
.chkrow input:checked + .chksw { background: #3aa655; }
.chkrow input:checked + .chksw::after { transform: translateX(18px); }
.chkrow input:focus-visible + .chksw { outline: 3px solid #f29a3a; outline-offset: 2px; }
.chktx { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.chktx b { font-size: .95rem; } .chktx small { color: #8a6a44; font-size: .76rem; line-height: 1.3; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(120, 70, 20, .09); }
.segb { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 6px; border-radius: 10px; font-weight: 800; font-size: .85rem; color: #7a4a14; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segb.on { background: #fff; color: #d97f1c; box-shadow: 0 2px 6px rgba(120, 70, 20, .22); }
.presets { margin: 4px 0 10px; }
.maprow.stack { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 0; }
.maprow.stack .maplabel { text-align: left; }
.maprow.stack input[type=range] { width: 100%; }
.vcprev { position: relative; height: 112px; margin-top: 12px; border-radius: 16px; border: 2px dashed #e0b060; background: rgba(255, 255, 255, .5); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.pvstick { width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .55); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); display: grid; place-items: center; }
.pvstick i { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.pvbtn { width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 190, 90, .85); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); display: grid; place-items: center; }
.pvbtn .ico { margin: 0; }

/* info & pintasan */
.inforow { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed #ecd2a4; font-size: .9rem; align-items: start; }
.inforow b { color: #a85a00; } .inforow span { overflow-wrap: anywhere; }
.maprow.trio, .maprow.hd { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.maprow.hd .maplabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #a58a66; text-align: center; } .maprow.hd .maplabel:first-child { text-align: left; }
kbd { display: block; text-align: center; padding: 3px 6px; border-radius: 8px; background: #fff; border: 2px solid #e8c88e; box-shadow: 0 2px 0 #e0c08a; font: 800 .78rem/1.3 inherit; color: #7a4a14; overflow-wrap: anywhere; min-width: 0; }

/* ===== toko ===== */
.mcard.shopwin { width: min(580px, 100%); } .mcard.shopwin.small { width: min(440px, 100%); }
.shopview { margin-top: 10px; }
.pkggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 8px; }
.pkg { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: 16px; background: #fff; border: 2px solid #f0d9ae; box-shadow: 0 3px 0 #ecd2a4; }
.pkgtop { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pkgname { overflow-wrap: anywhere; font-size: 1rem; }
.pkgbadge { flex: none; padding: 1px 9px; border-radius: 99px; background: #e8604c; color: #fff; font-size: .66rem; font-weight: 900; }
.pkgdesc { margin: 0; font-size: .82rem; color: #7a5a3a; overflow-wrap: anywhere; }
.pkgget { display: flex; flex-wrap: wrap; gap: 6px; }
.gchip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 10px 2px 6px; border-radius: 99px; background: #fff6e0; border: 1.5px solid #f0d9ae; font-size: .8rem; }
.gchip b { overflow-wrap: anywhere; }
.pkgfoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pkgprice { color: #2e8b4e; font-size: 1.05rem; }
.ordlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ordrow { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 14px; background: #fff; border: 2px solid #f0d9ae; min-width: 0; }
.ordrow.stk { flex-direction: column; align-items: stretch; }
.ordtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ordl { display: flex; flex-direction: column; min-width: 0; flex: 1; } .ordl b, .ordl small, .ordnote { overflow-wrap: anywhere; } .ordl small, .ordnote { color: #8a6a44; font-size: .76rem; }
.astatus { flex: none; white-space: nowrap; }
.paybox { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px 0; padding: 12px; text-align: center; border-radius: 16px; background: #fff; border: 2px dashed #e0b060; }
.paybox small { color: #8a6a44; overflow-wrap: anywhere; }
.paytot { font-size: 1.8rem; color: #2e8b4e; }
.paytext { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; border-radius: 12px; background: #fff; font-size: .9rem; margin-bottom: 8px; }
.shopedit input, .shopedit select, .shopedit textarea, .shopwin .mbody > .shopview + * input { width: 100%; padding: 9px 12px; border-radius: 12px; border: 2px solid #d4dde5; background: #fff; font: inherit; color: var(--ink); min-width: 0; -webkit-user-select: text; user-select: text; }
.shopedit textarea { resize: vertical; }
.shopwin input[type=text] { width: 100%; padding: 9px 12px; border-radius: 12px; border: 2px solid #d4dde5; background: #fff; font: inherit; margin-top: 8px; }
.afield { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: .76rem; font-weight: 800; color: #7a4a14; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.itemrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
.mapkey.static { pointer-events: none; background: #fff; }
.mapkey.good { color: #2e8b4e; border-color: #8fd3a0; }
body.net-off #onlineText::after { content: ' (offline)'; }

.settings .tabs, .shopwin .tabs { overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.settings .tabs::-webkit-scrollbar, .shopwin .tabs::-webkit-scrollbar { display: none; }
.settings .tab { padding: 8px 7px; font-size: .82rem; flex: 1 0 auto; }
input[type=range] { accent-color: #f29a3a; }
.pill .ic { vertical-align: -3px; }

/* lanskap pendek (HP): kontrol layar turun ke bawah, tidak menutupi dok */
@media (max-height: 520px) {
  #stick, .vbtns { bottom: calc(14px + var(--safe-b)); }
  body.vc-on #chatform { left: calc(150px + var(--safe-l)); right: calc(150px + var(--safe-r)); width: auto; transform: none; bottom: calc(24px + var(--safe-b)); }
  body.vc-on.vc-btns #act, body.vc-on #act { bottom: calc(14px + 120px * var(--vcs) + 12px + var(--safe-b)); }
  body.vc-on:not(.vc-btns) #act { bottom: calc(14px + 66px * var(--vcs) + 12px + var(--safe-b)); }
}

/* footer terbaca di atas konten apa pun */
.foot { background: linear-gradient(0deg, rgba(40, 24, 10, .55), rgba(40, 24, 10, 0)); padding-top: 12px; }
body:not(.playing) .foot { background: linear-gradient(0deg, rgba(40, 24, 10, .7), rgba(40, 24, 10, 0)); }

/* layar sangat sempit / pendek: rapatkan agar tidak saling timpa */
@media (max-width: 370px) {
  :root { --auto-scale: .88; }
  .srow2 { gap: 3px; flex-wrap: wrap; } .chip2 { min-width: 0; flex: 1 1 100%; padding: 0 7px 0 5px; font-size: .78rem; gap: 4px; }
  .chip2 b { overflow: hidden; text-overflow: ellipsis; }
  .sname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-height: 660px) and (orientation: portrait) {
  #stick, .vbtns { bottom: calc(80px + var(--safe-b)); }
  body.vc-on #act, body.vc-on.vc-btns #act { bottom: calc(80px + 120px * var(--vcs) + 10px + var(--safe-b)); }
  body.vc-on:not(.vc-btns) #act { bottom: calc(80px + 66px * var(--vcs) + 10px + var(--safe-b)); }
}

.shopedit input, .shopedit select { height: 42px; }
.two { align-items: end; }

/* ===== v5: gim ringan, memasak, fasilitas ===== */
.mg .mgstage { min-height: 250px; margin: 6px 0; position: relative; }
.mg .yhud:empty { display: none; }
.mgfoot { text-align: center; color: #7a5a3a; font-size: .85rem; margin-top: 8px; }
.mgres { text-align: center; padding: 18px 8px; }
.mgresT { font-size: 1.5rem; font-weight: 900; color: #c4631a; }
.mgresS { color: #7a5a3a; margin-top: 4px; }
.mgresR { font-weight: 800; margin-top: 10px; font-size: 1.1rem; color: #2b3445; }
.mgpad { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }
.mgpad .ghost { min-width: 84px; font-size: 1.3rem; padding: 12px 20px; touch-action: manipulation; }
.mbody .ghost.big { padding: 16px 28px; font-size: 1.3rem; }
/* pukul tikus */
.molegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 0 auto; }
.hole { position: relative; aspect-ratio: 1; border: 0; border-radius: 50%/42%; background: radial-gradient(ellipse at 50% 68%, #3b2a1b 0 48%, #8b6a45 50%); overflow: hidden; padding: 0; touch-action: manipulation; }
.hole .mole { position: absolute; left: 50%; bottom: -60%; width: 70%; transform: translateX(-50%); transition: bottom .12s; display: grid; place-items: center; }
.hole .mole .ico { width: 100%; height: auto; }
.hole .mole.up { bottom: 6%; } .hole .mole.hit { bottom: 14%; animation: hitpop .25s; }
@keyframes hitpop { 50% { transform: translateX(-50%) scale(1.25); } }
/* pasang kartu */
.cardgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 340px; margin: 0 auto; }
.mcardf { position: relative; aspect-ratio: 3/4; border: 3px solid #fff; border-radius: 14px; background: linear-gradient(145deg, #ffb25c, #f2793a); box-shadow: 0 3px 0 #c75a1f; padding: 0; perspective: 600px; display: grid; place-items: center; }
.mcardf .cb, .mcardf .cf { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; backface-visibility: hidden; transition: transform .3s; border-radius: 11px; }
.mcardf .cb .ico, .mcardf .cf .ico { width: 56%; height: auto; margin: 0; }
.mcardf .cb { opacity: .85; } .mcardf .cf { background: #fff; transform: rotateY(180deg); }
.mcardf.up .cb, .mcardf.ok .cb { transform: rotateY(180deg); } .mcardf.up .cf, .mcardf.ok .cf { transform: rotateY(0); }
.mcardf.ok { box-shadow: 0 3px 0 #3fae4a; border-color: #b6f0a8; }
/* tangkap ikan */
.catchfield { position: relative; height: 260px; border-radius: 18px; overflow: hidden; background: linear-gradient(#bfe9ff, #8fd0f0 70%, #5fb0dd); border: 3px solid #fff; touch-action: none; }
.basket { position: absolute; bottom: 4px; width: 62px; transform: translateX(-50%); transition: left .05s linear; }
.basket .ico { width: 100%; height: auto; margin: 0; }
.drop { position: absolute; width: 36px; transform: translateX(-50%); top: 0; pointer-events: none; }
.drop .ico { width: 100%; height: auto; margin: 0; }
/* puzzle */
.puzzle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(300px, 80vw); margin: 0 auto; }
.ptile { aspect-ratio: 1; border: 3px solid #fff; border-radius: 14px; font-size: 2rem; font-weight: 900; color: #fff; background: hsl(var(--hue, 30), 78%, 56%); box-shadow: 0 3px 0 rgba(0, 0, 0, .22); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); touch-action: manipulation; }
.ptile.empty { background: rgba(0, 0, 0, .08); border-style: dashed; border-color: #d9c39a; box-shadow: none; }
/* cari kucing */
.boxgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 6px auto; }
.cbox { aspect-ratio: 1; border: 3px solid #fff; border-radius: 16px; background: #f1dfbd; display: grid; place-items: center; padding: 0; transition: transform .15s; touch-action: manipulation; }
.cbox .ico { width: 62%; height: auto; margin: 0; } .cbox:active { transform: scale(.94); } .cbox.open { background: #e6f7dd; }
/* tebak cangkir */
.cups { position: relative; height: 170px; max-width: 360px; margin: 16px auto; }
.cup { position: absolute; top: 20px; width: 28%; border: 0; background: transparent; padding: 0; transition: left .4s ease, transform .35s; transform: translateY(-34px); }
.cup.down { transform: translateY(0); } .cup .ico { width: 100%; height: auto; margin: 0; }
.cball { position: absolute; top: 112px; width: 11%; margin-left: 8.5%; opacity: 0; transition: opacity .2s; pointer-events: none; }
.cball.show { opacity: 1; } .cball .ico { width: 100%; height: auto; margin: 0; }
/* jungkat-jungkit, lari */
.seesawbox { position: relative; height: 170px; margin: 12px 0; }
.plank { position: absolute; left: 6%; right: 6%; top: 70px; height: 20px; border-radius: 10px; background: #7e57c2; border: 3px solid #4a2a8a; transition: background .2s; transform-origin: 50% 50%; }
.plank.bad { background: #e0643c; }
.fulcrum { position: absolute; left: 50%; top: 88px; width: 0; height: 0; border-left: 28px solid transparent; border-right: 28px solid transparent; border-bottom: 56px solid #a8702d; transform: translateX(-50%); }
.lane { position: relative; height: 90px; border-radius: 16px; background: repeating-linear-gradient(90deg, #d8725f 0 40px, #e48473 40px 80px); border: 3px solid #fff; margin: 18px 0; }
.runner { position: absolute; left: 0; top: 12px; width: 56px; transition: left .08s linear; } .runner .ico { width: 100%; height: auto; margin: 0; }
.swingtrack { margin: 40px 0 18px; }
/* menu gim */
.gmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gmcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; border: 3px solid #fff; border-radius: 18px; background: linear-gradient(#fff6e2, #ffe8bd); box-shadow: 0 3px 0 #e0c08a; text-align: center; min-height: 140px; }
.gmcard .gmi .ico { width: 52px; height: 52px; margin: 0; } .gmn { font-weight: 900; color: #4a2a0e; } .gmd { font-size: .78rem; color: #7a5a3a; line-height: 1.25; }
.gmcard.locked { filter: grayscale(.7); opacity: .8; } .gml { position: absolute; top: 8px; right: 8px; } .gml .ico { width: 22px; height: 22px; margin: 0; }
/* kebun */
.plots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border: 3px solid #fff; border-radius: 16px; background: linear-gradient(#a9815a, #8b6a45); color: #fff; font-weight: 800; }
.plot .pi .ico { width: 46px; height: 46px; margin: 0; } .plot.ready { background: linear-gradient(#8fe07a, #4fae4a); animation: pulse2 1s infinite alternate; } .pt { font-size: .8rem; }
@keyframes pulse2 { to { transform: scale(1.04); } }
/* memasak */
.recipes { display: flex; flex-direction: column; gap: 8px; }
.recipe { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: #fff7e8; border: 2px solid #f0d8a8; }
.recipe.no { opacity: .85; } .recipe.focus { border-color: #f29a3a; }
.recipe .ri .ico { width: 48px; height: 48px; margin: 0; } .rm { flex: 1; min-width: 0; } .rn { font-weight: 900; color: #4a2a0e; }
.rneed { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: .74rem; padding: 2px 7px 2px 3px; border-radius: 99px; background: #fff; border: 1.5px solid #e6d3ad; }
.chip .ico { width: 18px; height: 18px; margin: 0; } .chip.have { border-color: #8fd48a; color: #2f7a35; } .chip.lack { border-color: #f0a0a0; color: #b53a32; }
.cksteps { display: flex; gap: 6px; margin-bottom: 8px; } .ckstep { flex: 1; text-align: center; font-weight: 800; font-size: .8rem; padding: 6px 4px; border-radius: 99px; background: #f1dfbd; color: #9a7a55; }
.ckstep.on { background: #f29a3a; color: #fff; } .ckstep.done { background: #8fd48a; color: #fff; }
.board { position: relative; height: 150px; border-radius: 18px; background: linear-gradient(#d9a86a, #c08850); border: 4px solid #8a5a2a; overflow: hidden; touch-action: manipulation; }
.board.shake { animation: shk .18s; } @keyframes shk { 25% { transform: translateY(3px); } 75% { transform: translateY(-2px); } }
.board .ing { position: absolute; left: 50%; top: 50%; width: 110px; transform: translate(-50%, -50%); } .board .ing .ico { width: 100%; height: auto; margin: 0; }
.cutline { position: absolute; top: 8px; bottom: 8px; width: 0; border-left: 3px dashed rgba(255, 255, 255, .75); } .cutline.next { border-color: #ffe27a; filter: drop-shadow(0 0 4px #ffe27a); }
.cutline.perfect { border: 0; width: 5px; margin-left: -2px; background: #8fe07a; } .cutline.good { border: 0; width: 5px; margin-left: -2px; background: #7ab8f0; } .cutline.bad { border: 0; width: 5px; margin-left: -2px; background: #e0643c; }
.knife { position: absolute; top: -4px; width: 44px; margin-left: -22px; transform: rotate(90deg); pointer-events: none; } .knife .ico { width: 100%; height: auto; margin: 0; }
.hob { position: relative; display: flex; gap: 12px; align-items: flex-end; height: 200px; padding: 8px; border-radius: 18px; background: linear-gradient(#4a4f5c, #2f333d); border: 3px solid #fff; }
.panw { position: relative; flex: 1; height: 100%; display: grid; place-items: center; }
.vessel { width: 150px; z-index: 1; } .vessel .ico { width: 100%; height: auto; margin: 0; }
.pfood { position: absolute; z-index: 2; width: 56px; top: 34%; transition: transform .3s; } .pfood .ico { width: 100%; height: auto; margin: 0; }
.pfood.flipnow { animation: fl 0.5s infinite alternate; } .pfood.flipped { transform: scaleX(-1); } @keyframes fl { to { transform: translateY(-10px) rotate(12deg); } }
.flame { position: absolute; left: 50%; bottom: 4px; width: 90px; height: 40px; margin-left: -45px; border-radius: 50% 50% 20% 20%; background: radial-gradient(#fff3a0, #ff8a2a 60%, rgba(255, 60, 20, 0)); transform-origin: 50% 100%; filter: blur(2px); }
.gauges { display: flex; gap: 10px; height: 100%; align-items: stretch; }
.gauge { position: relative; width: 26px; border-radius: 99px; background: #1c1f27; border: 3px solid #fff; overflow: hidden; }
.gzone { position: absolute; left: 0; right: 0; background: rgba(110, 230, 120, .45); border-top: 2px solid #8fe07a; border-bottom: 2px solid #8fe07a; }
.gfill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#ffb43a, #ff6a2a); } .gfill.ok { background: linear-gradient(#b6f08f, #4fae4a); } .gfill.hot { background: linear-gradient(#ff7a5a, #d9302c); }
.bars { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: 92px; color: #fff; } .bars small { font-size: .7rem; font-weight: 800; }
.bar { height: 12px; border-radius: 99px; background: #1c1f27; overflow: hidden; border: 2px solid #fff; } .bfill { height: 100%; width: 0; } .cookedb .bfill { background: #8fe07a; } .burnb .bfill { background: #e0643c; }
.ckbtns { display: flex; gap: 10px; margin-top: 10px; } .ckbtns .primary, .ckbtns .ghost { flex: 1; margin: 0; }
.fire.hold { transform: translateY(3px); filter: brightness(1.15); } .fire .ico { width: 22px; height: 22px; }
.platew { position: relative; height: 170px; margin: 6px 0; display: grid; place-items: center; }
.platew .plate .ico { width: 170px; height: 170px; margin: 0; } .pdish { position: absolute; width: 90px; } .pdish .ico { width: 100%; height: auto; margin: 0; }
.topping { position: absolute; width: 26px; animation: dropin .3s; } .topping .ico { width: 100%; height: auto; margin: 0; } @keyframes dropin { from { transform: translateY(-30px); opacity: 0; } }
.seq { display: flex; gap: 8px; justify-content: center; margin: 6px 0; } .sq { padding: 6px; border-radius: 12px; background: #fff7e8; border: 2px solid #f0d8a8; } .sq.ok { background: #e4f8dc; border-color: #8fd48a; } .sq.shake { animation: shk .25s; } .sq .ico { width: 30px; height: 30px; margin: 0; }
.garn { display: flex; gap: 8px; justify-content: center; } .garnb { border: 3px solid #fff; border-radius: 14px; background: #ffe8bd; padding: 8px 12px; box-shadow: 0 3px 0 #e0c08a; } .garnb .ico { width: 34px; height: 34px; margin: 0; }
.stars { display: flex; gap: 6px; justify-content: center; margin-bottom: 4px; } .stars .st { opacity: .22; filter: grayscale(1); } .stars .st.on { opacity: 1; filter: none; animation: dropin .4s; } .stars .ico { width: 44px; height: 44px; margin: 0; }
/* tombol layar: lari & loncat */
.vbtns { width: calc(200px * var(--vcs)); height: calc(150px * var(--vcs)); }
.vb-a { right: 0; bottom: 0; }
.vb-s1 { left: auto; right: calc(64px * var(--vcs)); top: auto; bottom: calc(66px * var(--vcs)); width: calc(40px * var(--vcs)); height: calc(40px * var(--vcs)); }
.vb-s2 { left: auto; right: calc(114px * var(--vcs)); top: auto; bottom: calc(56px * var(--vcs)); width: calc(38px * var(--vcs)); height: calc(38px * var(--vcs)); }
.vb-s3 { left: auto; right: calc(138px * var(--vcs)); top: auto; bottom: calc(6px * var(--vcs)); width: calc(38px * var(--vcs)); height: calc(38px * var(--vcs)); }
.vb-jump { right: calc(74px * var(--vcs)); bottom: calc(4px * var(--vcs)); width: calc(54px * var(--vcs)); height: calc(54px * var(--vcs)); background: rgba(120, 200, 255, .75); }
.vb-run { right: calc(6px * var(--vcs)); bottom: calc(74px * var(--vcs)); width: calc(46px * var(--vcs)); height: calc(46px * var(--vcs)); background: rgba(255, 150, 120, .75); }
body.run-on .vb-run { background: #ff5a3a; box-shadow: 0 0 0 4px rgba(255, 255, 255, .85); }
body.vc-left .vb-a { right: auto; left: 0; } body.vc-left .vb-jump { right: auto; left: calc(74px * var(--vcs)); } body.vc-left .vb-run { right: auto; left: calc(6px * var(--vcs)); }
body.vc-left .vb-s1 { right: auto; left: calc(64px * var(--vcs)); } body.vc-left .vb-s2 { right: auto; left: calc(114px * var(--vcs)); } body.vc-left .vb-s3 { right: auto; left: calc(138px * var(--vcs)); }
body.vc-on #act, body.vc-on.vc-btns #act { bottom: calc(120px + 150px * var(--vcs) + 14px + var(--safe-b)); }
/* pengingat daftar / pasang */
.promo { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 60; width: min(420px, calc(100vw - 24px)); display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 18px; background: #fff; border: 3px solid #f29a3a; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); animation: promoin .35s cubic-bezier(.2, 1.3, .4, 1); }
.promo.out { opacity: 0; transform: translateX(-50%) translateY(20px); transition: all .3s; }
@keyframes promoin { from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.9); } }
.promo .pic .ico { width: 44px; height: 44px; margin: 0; } .promo .pt1 { flex: 1; min-width: 0; font-size: .86rem; color: #4a2a0e; line-height: 1.3; } .promo .pt1 b { display: block; font-size: .95rem; }
.promo .pbtns { display: flex; flex-direction: column; gap: 4px; } .promo .pbtns button { border: 0; border-radius: 10px; padding: 6px 12px; font-weight: 800; background: #f29a3a; color: #fff; } .promo .pbtns button.x { background: #f1dfbd; color: #7a5a3a; }
@media (max-width: 760px) { .promo { bottom: calc(80px + var(--safe-b)); } }

/* ---- v5.1: musik latar, getar ---- */
.bgmhead { margin: 12px 0 4px; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #a58a66; }
.bgmrow .maplabel { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.bgmrow .maplabel b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgmrow .maplabel small { color: #a58a66; font-weight: 700; font-size: .72rem; }
.bgmrow.now .maplabel b { color: #d97f1c; }
.bgmrow .mapkey { flex: 0 0 auto; min-width: 62px; }
.mapkey.danger { color: #b8402f; border-color: #eab0a6; box-shadow: 0 3px 0 #e2a79c; }
.bgmbtn { width: 100%; margin: 8px 0 12px; }
.bgmadd { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.bgmadd input[type=text] { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 2px solid #e8c88e; background: #fff; font: inherit; color: #5a3a14; }
.bgmadd .mapkey { flex: 0 0 auto; }

/* ===== v5.3: mode tampilan HUD (Penuh / Ringkas / Bersih) ===== */
.hudback { display: none; position: fixed; top: calc(10px + var(--safe-t)); right: calc(10px + var(--safe-r)); z-index: 40; width: 40px; height: 40px; opacity: .8; }
.hudback .ico { width: 22px; height: 22px; }
body.hm-clean .hudback { display: grid; place-items: center; }
#menuScrim { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(30, 18, 6, .45); z-index: 55; }
body.menu-open #menuScrim { display: block; }
body.hm-full #btnMenu { display: none; }
body.hm-full .iconbtns { display: flex; }
body.hm-compact .iconbtns, body.hm-clean .iconbtns { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 6px; }
body.hm-compact .round, body.hm-clean .round { --rb: 40px; width: 40px; height: 40px; font-size: 1.1rem; }
/* ringkas: sembunyikan yang jarang dipakai */
body.hm-compact #quest, body.hm-compact #minimap, body.hm-compact #hCleanW { display: none !important; }
body.hm-compact #info > :nth-child(3), body.hm-compact #info > :nth-child(4), body.hm-compact #info > :nth-child(6), body.hm-compact #info > :nth-child(7) { display: none; }
body.hm-compact #chatlog, body.hm-compact #chatform { display: none; }
body.hm-compact.chat-open #chatform { display: flex; }
body.hm-compact.chat-open #chatlog:not(:empty) { display: block; }
/* bersih: hanya kontrol bermain */
body.hm-clean #hudL, body.hm-clean #hudC #info, body.hm-clean #minimap, body.hm-clean .iconbtns, body.hm-clean #chatlog { display: none !important; }
body.hm-clean #chatform { display: none; }
body.hm-clean.chat-open #chatform { display: flex; }
body.hm-clean #hudR { pointer-events: none; }
/* menu sebagai kartu di tengah layar (tidak menimpa apa pun) */
body.hm-compact .dock, body.hm-clean .dock { display: none; }
body.hm-compact.menu-open .dock, body.hm-clean.menu-open .dock {
  display: grid; position: fixed; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); z-index: 56;
  width: min(300px, calc(100vw - 40px)); grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; border-radius: 26px;
  background: var(--panel); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); border: 3px solid #fff;
}
body.hm-compact.menu-open .dockbtn, body.hm-clean.menu-open .dockbtn { width: 100%; height: auto; aspect-ratio: 1 / 1; }
/* kontrol layar turun saat obrolan/dok tersembunyi, lalu naik lagi saat mengetik */
body.hm-compact.vc-on:not(.chat-open) #stick, body.hm-compact.vc-on:not(.chat-open) .vbtns,
body.hm-clean.vc-on:not(.chat-open) #stick, body.hm-clean.vc-on:not(.chat-open) .vbtns { bottom: calc(34px + var(--safe-b)); }
body.hm-compact.vc-on:not(.chat-open) #act, body.hm-clean.vc-on:not(.chat-open) #act { bottom: calc(34px + 150px * var(--vcs) + 14px + var(--safe-b)); }
body.hm-compact.vc-on:not(.vc-btns):not(.chat-open) #act, body.hm-clean.vc-on:not(.vc-btns):not(.chat-open) #act { bottom: calc(34px + 66px * var(--vcs) + 14px + var(--safe-b)); }
/* lanskap pendek: kolom obrolan tidak menabrak tombol layar */
@media (max-height: 520px) {
  #stick, .vbtns { bottom: calc(24px + var(--safe-b)); }
  body.vc-on #act, body.vc-on.vc-btns #act, body.vc-on:not(.vc-btns) #act { bottom: calc(24px + 150px * var(--vcs) + 10px + var(--safe-b)); }
  body.vc-on #chatform { left: calc(40px + 120px * var(--vcs) + var(--safe-l)); right: calc(40px + 200px * var(--vcs) + var(--safe-r)); }
  body.vc-left.vc-on #chatform { left: calc(40px + 200px * var(--vcs) + var(--safe-l)); right: calc(40px + 120px * var(--vcs) + var(--safe-r)); }
  body.hm-compact.vc-on:not(.chat-open) #stick, body.hm-compact.vc-on:not(.chat-open) .vbtns, body.hm-clean.vc-on:not(.chat-open) #stick, body.hm-clean.vc-on:not(.chat-open) .vbtns { bottom: calc(24px + var(--safe-b)); }
  body.hm-compact.vc-on:not(.chat-open) #act, body.hm-clean.vc-on:not(.chat-open) #act, body.hm-compact.vc-on:not(.vc-btns):not(.chat-open) #act, body.hm-clean.vc-on:not(.vc-btns):not(.chat-open) #act { bottom: calc(24px + 150px * var(--vcs) + 10px + var(--safe-b)); }
  body.hm-compact .statcard { padding: 5px 7px 5px 5px; }
}

/* ===== v5.3: gim baru ===== */
.rcanvas { display: block; margin: 0 auto; width: min(288px, 100%); height: auto; border-radius: 16px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); touch-action: none; }
.rpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 288px; margin: 10px auto 0; }
.rkey { height: 54px; border-radius: 16px; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); touch-action: manipulation; }
.rkey:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.hbox { text-align: center; padding: 8px 0; }
.hq { font-size: 2.4rem; font-weight: 900; color: #3a2616; margin: 10px 0 16px; font-variant-numeric: tabular-nums; }
.hopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 320px; margin: 0 auto; }
.hopts .ghost.big { padding: 14px 10px; font-size: 1.5rem; font-weight: 900; }
.kbox { text-align: center; padding: 6px 0; }
.kclue { color: #7a5a3a; font-weight: 700; margin-bottom: 8px; }
.kans { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.kslot { width: 38px; height: 46px; border-radius: 10px; border: 3px dashed #e0c08a; background: #fff8ea; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; color: #3a2616; }
.ktiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; max-width: 340px; margin-left: auto; margin-right: auto; }
.ktile { width: 46px; height: 52px; border-radius: 12px; border: 3px solid #fff; background: linear-gradient(145deg, #ffb25c, #f2793a); box-shadow: 0 3px 0 #c75a1f; color: #fff; font-weight: 900; font-size: 1.4rem; padding: 0; touch-action: manipulation; }
.ktile.used { opacity: .25; box-shadow: none; }
.ktile.shake { animation: shk .25s; }

/* ===== v5.3 fitur baru: tab, kuis kategori, prestasi, album, hadiah harian, roda ===== */
.ftabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ftab { flex: 1 1 0; min-width: 0; position: relative; padding: 9px 6px; border-radius: 14px; border: 3px solid #fff; background: #fff4dc; color: #7a4a14; font-weight: 800; box-shadow: 0 3px 0 #e0c08a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftab.on { background: linear-gradient(180deg, #ffb347, #f29a3a); color: #fff; box-shadow: 0 3px 0 #c9751a; }
.tbadge { position: absolute; top: -2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: #e8453c; color: #fff; font-size: .68rem; font-style: normal; display: grid; place-items: center; border: 2px solid #fff; }
.bonusrow { border-bottom: 0; background: #fff1c9; border-radius: 12px; padding: 8px 10px; margin-top: 8px; }
.achhead { text-align: center; font-weight: 800; color: #7a4a14; margin: 0 0 10px; }
.qcats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; }
.qcat { flex: 0 0 auto; padding: 6px 12px; border-radius: 99px; border: 2px solid #fff; background: #fff4dc; color: #7a4a14; font-weight: 800; font-size: .8rem; box-shadow: 0 2px 0 #e0c08a; white-space: nowrap; }
.qcat.on { background: #f29a3a; color: #fff; }
.colhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.colhead h3 { margin: 0; min-width: 0; }
.colgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.colcell { aspect-ratio: 1 / 1; border-radius: 12px; background: #efe1c4; display: grid; place-items: center; font-size: 1.5rem; opacity: .55; }
.colcell.got { background: #fff; opacity: 1; box-shadow: 0 2px 0 #e0c08a; }
.giftgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.giftcell { position: relative; border-radius: 14px; background: #fff; border: 3px solid #fff; box-shadow: 0 3px 0 #e0c08a; padding: 6px 4px; text-align: center; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.giftcell b { font-size: .72rem; color: #7a4a14; } .giftcell .gi { font-size: 1.5rem; } .giftcell small { font-size: .62rem; line-height: 1.2; color: #7a4a14; word-break: break-word; }
.giftcell.today { border-color: #f29a3a; background: #fff1c9; animation: gpulse 1.2s infinite alternate; }
.giftcell.taken { opacity: .55; } .giftcell.big { grid-column: span 2; background: #ffe9a8; }
.colhead .btn, .colhead button { white-space: nowrap; flex: 0 0 auto; }
.gdone { position: absolute; top: 2px; right: 4px; font-size: 1rem; }
@keyframes gpulse { from { transform: scale(1); } to { transform: scale(1.05); } }
.fsep { border: 0; border-top: 1px dashed #e0c08a; margin: 12px 0; }
.wheel .mbody { text-align: center; }
.wcanvas { display: block; margin: 0 auto 8px; width: min(300px, 78vw); height: auto; aspect-ratio: 1 / 1; }
.wmsg { margin: 6px 0 10px; font-weight: 800; }
@media (max-height: 420px) { body.hm-compact.menu-open .dock, body.hm-clean.menu-open .dock { width: min(250px, calc(100vw - 40px)); gap: 6px; padding: 10px; } .giftgrid { grid-template-columns: repeat(7, 1fr); } .giftcell.big { grid-column: span 1; } .wcanvas { width: min(220px, 60vh); } }
@media (max-width: 380px) { .giftgrid { grid-template-columns: repeat(3, 1fr); } .giftcell.big { grid-column: span 3; } .ftab { font-size: .8rem; padding: 8px 2px; } }

/* ===== v5.4: HUD toggle & obrolan kecil ===== */
.chattog { flex: 0 0 auto; width: 38px; height: 38px; align-self: center; padding: 0; border-radius: 50%; border: 0; background: var(--panel); box-shadow: 0 3px 12px rgba(0, 0, 0, .2); display: grid; place-items: center; }
.chattog .ico { width: 1.2em; height: 1.2em; }
#chatform { width: min(340px, calc(100vw - 20px)); gap: 6px; }
#chatform input { padding: 8px 12px; font-size: .88rem; }
.send { padding: 0 14px; font-size: .85rem; }
#chatlog { width: min(240px, 58vw); max-height: 96px; font-size: .74rem; padding: 6px 8px; background: rgba(255, 255, 255, .7); }
body.chat-min #chatlog { display: none !important; }
body.chat-min #chatform { width: auto; }
body.chat-min #chatform input, body.chat-min #chatform .send { display: none; }
body.chat-min.chat-open #chatform input, body.chat-min.chat-open #chatform .send { display: block; }
#btnHud[data-state="off"] { opacity: .8; }
body.hm-clean #hudBack { display: grid; }

/* ===== v5.4: pulau, kendaraan, peta ===== */
.travel { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90; background: #000; display: grid; place-items: center; transition: opacity .4s; }
.travel.out { opacity: 0; pointer-events: none; }
.travel canvas { max-width: 900px; max-height: 560px; width: 100%; height: 100%; border-radius: 0; }
.islrow .islhead { display: flex; gap: 10px; align-items: flex-start; }
.islrow .isli { font-size: 1.8rem; line-height: 1; }
.islrow.locked { opacity: .92; }
.islreq { margin: 6px 0; display: grid; gap: 2px; }
.islreq .td.ok { color: #2e7d32; font-weight: 700; }
.vehrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vehsec canvas { width: 120px; height: 70px; border-radius: 10px; background: #e9f4ff; flex: none; }
.worldmap .mbody, .garage .mbody, .rareshop .mbody, .groom .mbody { max-height: 70vh; overflow: auto; }
.swatches.big { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.swatches.big .sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #2b1d22; cursor: pointer; }
.swatches.big .sw.on { box-shadow: 0 0 0 3px #e8753a, 0 0 0 5px #fff; }
.pbar { height: 12px; background: #eee; border-radius: 8px; overflow: hidden; margin: 8px 0; }
.pfill { height: 100%; width: 0; background: #7e57c2; transition: width .2s; }
body.riding #btnVeh { outline: 3px solid #4caf50; }
.dock { grid-template-columns: repeat(4, 1fr); }
.vehsec { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.vehsec .vehcv { width: 140px; height: 70px; border-radius: 10px; background: #e9f4ff; flex: none; }
.vehsec .vehinfo { flex: 1; min-width: 150px; }
.vehsec h3 { margin: 0 0 2px; font-size: 1rem; color: #7a4a14; }
/* ===== v5.6: tim & dorong ===== */
.coopcount { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 600; font: 900 7rem/1 system-ui, sans-serif; color: #fff; text-shadow: 0 6px 0 #e8753a, 0 0 30px rgba(0, 0, 0, .4); pointer-events: none; }
.pushtrack { position: relative; height: 70px; margin: 14px 0; border-radius: 35px; background: #e8f0f6; border: 3px solid #2b1d22; overflow: hidden; }
.pushfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffd24a, #ff9f3a); transition: width .15s linear; }
.pushbox { position: absolute; top: 12px; left: 6px; font-size: 2.6rem; line-height: 1; transition: left .15s linear; }
.pushflag { position: absolute; right: 12px; top: 14px; font-size: 2.2rem; line-height: 1; }
.pushbtn { width: 100%; padding: 18px; font-size: 1.5rem; touch-action: manipulation; user-select: none; }

/* ===== v5.6: tampilan lebih hidup (hanya transform/opacity, ringan) ===== */
.card { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(180deg, #fffdf8, #fff3df); border: 3px solid #fff; box-shadow: 0 18px 50px rgba(30, 60, 80, .35), 0 0 0 4px rgba(255, 190, 90, .55); animation: cardin .5s cubic-bezier(.2, 1.2, .3, 1) both; }
.card h1 { background: linear-gradient(180deg, #ffb347, #e8701a 70%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 2px 0 rgba(140, 70, 10, .35)); }
#preview { animation: floaty 3.2s ease-in-out infinite; }
.primary { background: linear-gradient(180deg, #ffb957, #f08a22); box-shadow: 0 5px 0 #c9660f, 0 8px 18px rgba(240, 138, 34, .35); transition: transform .12s, box-shadow .12s, filter .12s; }
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #c9660f; }
.statcard, .questcard { background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 244, 224, .94)); border: 2px solid #fff; box-shadow: 0 6px 18px rgba(30, 40, 60, .28), inset 0 1px 0 #fff; }
.dockbtn { background: linear-gradient(180deg, #fffaf0, #ffe9c4); border: 2px solid #fff; box-shadow: 0 4px 0 rgba(150, 90, 20, .4), 0 8px 14px rgba(30, 40, 60, .25); }
.dockbtn:hover { box-shadow: 0 4px 0 rgba(150, 90, 20, .4), 0 8px 14px rgba(30, 40, 60, .25), 0 0 0 3px rgba(255, 200, 100, .7); }
.mcard { border: 3px solid #fff; box-shadow: 0 24px 60px rgba(10, 20, 40, .45), 0 0 0 4px rgba(255, 190, 90, .5); }
.mhead { background: linear-gradient(180deg, #ffc468, #ef8f2c); box-shadow: inset 0 -3px 0 rgba(150, 80, 10, .25); }
.mhead h2 { text-shadow: 0 2px 0 rgba(150, 80, 10, .45); letter-spacing: .3px; }
.mback.in .mcard { animation: popin .22s cubic-bezier(.2, 1.3, .35, 1) both; }
.tsec, .drow { transition: transform .12s; }
.tsec:hover { transform: translateY(-1px); }
.badge { animation: badgepulse 1.8s ease-in-out infinite; }
.toast { box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
@keyframes cardin { from { transform: translateY(24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popin { from { transform: scale(.92); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes badgepulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body.perf-eco .card, body.perf-eco #preview, body.perf-eco .badge { animation: none; }

/* ===== v5.7: simpan/lanjutkan, kesehatan, teman, jarak tombol sentuh ===== */
.contbox { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 18px; background: linear-gradient(135deg, #fff3d6, #ffe3b0); border: 2px solid #f2c471; box-shadow: 0 3px 0 #e9b45e, 0 8px 18px rgba(160, 90, 20, .18); }
.contbox[hidden], body.playing .contbox { display: none; }
.contbox .cico { flex: none; width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #f6d9a0; }
.contbox .ctx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; color: #5a3510; }
.contbox .ctx b { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contbox .ctx span { font-size: .76rem; font-weight: 700; color: #7a5a3a; overflow-wrap: anywhere; }
.contbox .ctx .cwhere { color: #2e8b4e; }
.contbox .contbtn { flex: none; margin: 0; padding: 12px 16px; min-height: 46px; width: auto; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 420px) { .contbox { flex-wrap: wrap; } .contbox .contbtn { width: 100%; justify-content: center; } }

.sickchip { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 4px; padding: 5px 9px; border-radius: 12px; border: 2px solid #f0a28f; background: #fff0ea; color: #a33b22; font-weight: 800; font-size: .72rem; min-height: 34px; text-align: left; animation: sickpulse 2.4s ease-in-out infinite; }
.sickchip[hidden] { display: none; }
.sickchip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sickchip b { flex: none; padding: 2px 8px; border-radius: 99px; background: #e8553a; color: #fff; font-size: .66rem; }
.sickchip.bad { border-color: #e8553a; background: #ffe0d8; }
@keyframes sickpulse { 50% { box-shadow: 0 0 0 4px rgba(232, 85, 58, .18); } }
body.is-sick #avatar { filter: hue-rotate(60deg) saturate(.7); }
.healthst { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; margin-bottom: 8px; background: #eaf9ee; border: 2px solid #9bd6a9; }
.healthst.sick { background: #fff0ea; border-color: #f0a28f; }
.healthst .hico { font-size: 1.6rem; flex: none; }
.healthst .htx { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: #4a3520; }
.healthst .htx span { font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
.medrow { align-items: center; }

.frtop { display: flex; align-items: center; gap: 12px; padding: 4px 2px 10px; }
.frtop .cico { width: 52px; height: 52px; border-radius: 16px; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #f6d9a0; flex: none; }
.frtop .ctx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .frtop .ctx span { font-size: .82rem; color: #7a5a3a; font-weight: 700; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 6px 0 10px; }
.fbtn { min-height: 52px; margin: 0; padding: 10px 12px; border-radius: 16px; border: 2px solid #f0d9ae; background: #fff; color: #7a4a14; font-weight: 800; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; box-shadow: 0 3px 0 #ecd2a4; }
.fbtn.primary { background: linear-gradient(#ffbd5a, #f29a3a); color: #fff; border-color: #e58a22; box-shadow: 0 3px 0 #c9780c; }
.fbtn:disabled { opacity: .55; }
.fbtn.small { font-size: .8rem; min-height: 46px; }
.frrow.on { background: #f1fbf3; border-color: #9bd6a9; }
.frcard { position: fixed; left: 50%; top: calc(86px + var(--safe-t)); transform: translateX(-50%); z-index: 400; width: min(360px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: #fff8e8; border: 2px solid #f2c471; box-shadow: 0 10px 28px rgba(60, 30, 5, .35); animation: frin .25s ease-out; }
.frcard .frt { flex: 1; min-width: 0; display: flex; flex-direction: column; color: #5a3510; } .frcard .frt span { font-size: .8rem; font-weight: 700; }
.frcard .frb { display: flex; gap: 10px; flex: none; } .frcard .frb button { margin: 0; min-height: 44px; min-width: 70px; }
@keyframes frin { from { opacity: 0; transform: translate(-50%, -14px); } }

/* jarak tombol sentuh lebih lega agar tidak terpencet bersamaan */
.vbtns { width: calc(184px * var(--vcs)); height: calc(172px * var(--vcs)); }
.vb-a { width: calc(72px * var(--vcs)); height: calc(72px * var(--vcs)); right: 0; bottom: 0; }
.vb-s1, .vb-s2, .vb-s3 { width: calc(48px * var(--vcs)); height: calc(48px * var(--vcs)); }
.vb-s1 { left: calc(36px * var(--vcs)); bottom: calc(8px * var(--vcs)); top: auto; }
.vb-s2 { left: calc(24px * var(--vcs)); top: calc(46px * var(--vcs)); bottom: auto; }
.vb-s3 { left: calc(106px * var(--vcs)); top: calc(18px * var(--vcs)); }
body.vc-left .vb-a { right: auto; left: 0; } body.vc-left .vb-s1 { left: auto; right: calc(36px * var(--vcs)); } body.vc-left .vb-s2 { left: auto; right: calc(24px * var(--vcs)); } body.vc-left .vb-s3 { left: auto; right: calc(106px * var(--vcs)); }
body.vc-on #act { bottom: calc(120px + 172px * var(--vcs) + 14px + var(--safe-b)); }
body.vc-on.vc-btns #act { bottom: calc(120px + 172px * var(--vcs) + 14px + var(--safe-b)); }
body.vc-on:not(.vc-btns) #act { bottom: calc(120px + 66px * var(--vcs) + 14px + var(--safe-b)); }
@media (max-height: 520px) {
  body.vc-on.vc-btns #act, body.vc-on #act { bottom: calc(14px + 172px * var(--vcs) + 12px + var(--safe-b)); }
  .vbtns { transform-origin: bottom right; }
  body.vc-left .vbtns { transform-origin: bottom left; }
}
body .dock, body.in-room .dock { gap: 9px; }
.iconbtns { gap: 8px; }
body.touch .dockbtn, body.touch .round { min-width: 44px; min-height: 44px; }
@media (max-width: 720px) { .iconbtns { gap: 6px; } body .dock, body.in-room .dock { gap: 8px; } }

/* ===== tombol layar: tata letak busur dengan jarak min. 20px antar tombol ===== */
.vbtns { width: calc(232px * var(--vcs)); height: calc(222px * var(--vcs)); }
.vb { left: auto; top: auto; right: auto; bottom: auto; }
.vb-a { width: calc(72px * var(--vcs)); height: calc(72px * var(--vcs)); right: 0; bottom: 0; }
.vb-jump { width: calc(56px * var(--vcs)); height: calc(56px * var(--vcs)); right: calc(92px * var(--vcs)); bottom: 0; }
.vb-run { width: calc(52px * var(--vcs)); height: calc(52px * var(--vcs)); right: 0; bottom: calc(92px * var(--vcs)); }
.vb-s1 { width: calc(46px * var(--vcs)); height: calc(46px * var(--vcs)); right: calc(170px * var(--vcs)); bottom: calc(4px * var(--vcs)); }
.vb-s2 { width: calc(46px * var(--vcs)); height: calc(46px * var(--vcs)); right: calc(100px * var(--vcs)); bottom: calc(100px * var(--vcs)); }
.vb-s3 { width: calc(46px * var(--vcs)); height: calc(46px * var(--vcs)); right: calc(8px * var(--vcs)); bottom: calc(168px * var(--vcs)); }
body.vc-left .vb-a, body.vc-left .vb-jump, body.vc-left .vb-run, body.vc-left .vb-s1, body.vc-left .vb-s2, body.vc-left .vb-s3 { right: auto; }
body.vc-left .vb-a { left: 0; } body.vc-left .vb-jump { left: calc(92px * var(--vcs)); } body.vc-left .vb-run { left: 0; }
body.vc-left .vb-s1 { left: calc(170px * var(--vcs)); } body.vc-left .vb-s2 { left: calc(100px * var(--vcs)); } body.vc-left .vb-s3 { left: calc(8px * var(--vcs)); }
body.vc-on #act, body.vc-on.vc-btns #act { bottom: calc(120px + 222px * var(--vcs) + 12px + var(--safe-b)); }
@media (max-height: 520px) {
  body.vc-on.vc-btns #act, body.vc-on #act { bottom: calc(14px + 222px * var(--vcs) + 10px + var(--safe-b)); }
}
/* ikon bulat di kolom kanan: 3 per baris, ukuran sentuh 44px, jarak 10px */
.iconbtns { flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
body .iconbtns .round { width: 44px; height: 44px; flex: none; }
@media (max-width: 720px) { :root { --col: 164px; } .iconbtns { gap: 10px; } }
body .dock, body.in-room .dock { gap: 10px; }
@media (max-height: 520px) { body .dock, body.in-room .dock { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
body.hm-compact .iconbtns, body.hm-clean .iconbtns, body.hm-full .iconbtns { gap: 10px; }
@media (max-width: 400px) {
  .vbtns { transform: scale(.86); transform-origin: bottom right; }
  body.vc-left .vbtns { transform-origin: bottom left; }
  #stick { transform: scale(.86); transform-origin: bottom left; }
  body.vc-left #stick { transform-origin: bottom right; }
}
.frcard .frb button { white-space: nowrap; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; }
.frcard .frb .ghost { border: 2px solid #e0c08a; border-radius: 14px; background: #fff; text-decoration: none; }
.sickchip { pointer-events: auto; cursor: pointer; }
.medrow { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed #ecd2a4; }
.medrow .gi { flex: none; width: 40px; height: 40px; display: grid; place-items: center; }
.medrow .gi .ico { width: 34px; height: 34px; }
.medrow .dlm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.medrow .tt { font-weight: 800; } .medrow .td { font-size: .78rem; color: #7a5a3a; overflow-wrap: anywhere; }
.medrow button { flex: none; margin: 0; min-height: 44px; }
.frrow { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 14px; border: 2px solid #f0d9ae; background: #fff; margin-bottom: 8px; }
.frrow .gi { flex: none; width: 40px; height: 40px; display: grid; place-items: center; }
.frrow .dlm { flex: 1; min-width: 0; display: flex; flex-direction: column; } .frrow .td { font-size: .78rem; color: #7a5a3a; } .frrow button { flex: none; margin: 0; min-height: 40px; }
.sickchip { font-size: .7rem; }
.sickchip span { white-space: normal; line-height: 1.1; overflow: visible; }
.sickchip b { padding: 2px 6px; }
/* lanskap pendek: busur tombol melebar ke samping supaya tidak menutupi tombol atas */
@media (max-height: 520px) {
  .vbtns { width: calc(292px * var(--vcs)); height: calc(150px * var(--vcs)); }
  .vb-s3 { right: calc(236px * var(--vcs)); bottom: calc(44px * var(--vcs)); }
  body.vc-left .vb-s3 { right: auto; left: calc(236px * var(--vcs)); }
  body.vc-on.vc-btns #act, body.vc-on #act { bottom: calc(14px + 150px * var(--vcs) + 10px + var(--safe-b)); }
}
@media (max-height: 520px) {
  body.vc-on.vc-btns #chatform { right: calc(22px + 292px * var(--vcs) + 10px + var(--safe-r)); }
  body.vc-on.vc-btns.vc-left #chatform { right: calc(150px + var(--safe-r)); left: calc(22px + 292px * var(--vcs) + 10px + var(--safe-l)); }
}
