/* ---------- Ladang Ceria */
.feature-roof.ladang { background: repeating-linear-gradient(90deg, #8fe33c 0 28px, #fff6c9 28px 56px); }
.feature-roof.ladang::after { background: radial-gradient(circle at 14px 0, #8fe33c 13px, transparent 14px) 0 0 / 56px 12px repeat-x, radial-gradient(circle at 42px 0, #fff6c9 13px, transparent 14px) 0 0 / 56px 12px repeat-x; }
.feature[data-game="ladang"] .feature-art { background: linear-gradient(#d9f7b8, #fff6c9); }

.ld { position: relative; height: 100%; display: flex; flex-direction: column; background: #a8dd6a; color: var(--ink); overflow: hidden; }
.ld .art { display: block; }
.ld-top { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 10px) 10px 8px 64px; background: #3b1f74; color: var(--white); }
.ld-lv { flex: 1; min-width: 0; }
.ld-lv b { font-family: var(--display); font-weight: 400; font-size: 16px; display: block; line-height: 1.1; }
.ld-xp { display: block; height: 9px; border-radius: 99px; background: rgba(255,255,255,.18); border: 2px solid var(--ink); overflow: hidden; margin-top: 3px; }
.ld-xp i { display: block; height: 100%; background: var(--lime); }
.ld-cash { display: flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 18px; color: var(--gold); }
.ld-cash svg { width: 22px; height: 22px; }
.ld-bag { border: 2.5px solid var(--ink); border-radius: 99px; background: var(--white); padding: 3px 10px; font-weight: 800; font-size: 14px; box-shadow: 0 3px 0 #0b0620; color: var(--ink); }
.ld-hint { flex: none; background: var(--ink); color: var(--gold); text-align: center; font-weight: 800; font-size: 14.5px; padding: 6px 12px; }
.ld-hint[hidden] { display: none; }
.ld-main { flex: 1; overflow-y: auto; padding: 12px 12px 18px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 12px, transparent 12px 24px), #a8dd6a; }
.ld-tabs { flex: none; display: flex; gap: 4px; padding: 6px 8px calc(var(--safe-b) + 8px); background: var(--white); border-top: var(--line); }
.ld-tabs button { position: relative; flex: 1; border: 0; background: none; border-radius: 16px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; font-size: 22px; color: var(--ink); }
.ld-tabs button span { font-family: var(--display); font-size: 13px; }
.ld-tabs button.on { background: var(--gold); box-shadow: inset 0 0 0 2.5px var(--ink); }
.ld-dot { position: absolute; top: 2px; right: 22%; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); }
.ld-dot[hidden] { display: none; }

/* field */
.ld-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ld-actions .btn { flex: 1; font-size: 13px; padding: 6px 6px; white-space: nowrap; }
.ld-actions .btn[disabled] { opacity: .5; }
.ld-plots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ld-plot { position: relative; aspect-ratio: 1; border: var(--line); border-radius: 18px; background: repeating-linear-gradient(0deg, #8a5a35 0 10px, #7a4e2c 10px 12px); box-shadow: 0 4px 0 #4e341c; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; color: #fff3e0; touch-action: manipulation; }
.ld-plot:active { transform: translateY(3px); box-shadow: 0 1px 0 #4e341c; }
.ld-plot .art { width: 78%; height: 70%; }
.ld-plot small { font-family: var(--display); font-size: 13px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.ld-plot.empty { background: repeating-linear-gradient(0deg, #9c6a40 0 10px, #8a5a35 10px 12px); }
.ld-plus { font-size: 30px; font-weight: 900; line-height: 1; }
.ld-plot.ready { box-shadow: 0 4px 0 #4e341c, 0 0 0 4px var(--gold); animation: pulse 1s infinite; }
.ld-plot.thirsty small { color: #9ad8ff; }
.ld-plot.splash::after { content: "💦"; position: absolute; top: 4px; font-size: 26px; animation: rise .8s forwards; }
.ld-plot.buy { background: rgba(255,255,255,.35); border-style: dashed; box-shadow: none; color: var(--ink); text-align: center; }
.ld-plot.buy small { text-shadow: none; font-family: var(--body); font-weight: 800; font-size: 12px; line-height: 1.2; }
.ld-bar { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 6px; border-radius: 9px; background: rgba(0,0,0,.35); overflow: hidden; }
.ld-bar i { display: block; height: 100%; background: var(--lime); }
.ld-thirsty { animation: steam 1s ease-in-out infinite; }

/* cards */
.ld-list { display: flex; flex-direction: column; gap: 10px; }
.ld-h { font-size: 19px; color: var(--ink); margin: 6px 2px 0; }
.ld-card { display: flex; align-items: center; gap: 10px; background: var(--white); border: var(--line); border-radius: 18px; padding: 8px 10px; box-shadow: 0 4px 0 #4e7a2a; }
.ld-card > div { flex: 1; min-width: 0; }
.ld-card b { font-family: var(--display); font-weight: 400; font-size: 17px; display: block; line-height: 1.1; }
.ld-card small { font-size: 13px; font-weight: 700; color: var(--muted); display: block; line-height: 1.2; }
.ld-card.locked { opacity: .65; box-shadow: none; }
.ld-lock { font-size: 20px; }
.ld-ic { flex: none; width: 54px; height: 54px; }
.ld-ic .art { width: 100%; height: 100%; }
.ld-ic.sm { width: 40px; height: 40px; }
.ld-card.pen { flex-direction: column; align-items: stretch; }
.ld-card-head small { margin-top: 1px; }
.ld-pen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.ld-animal { position: relative; border: 2.5px solid var(--ink); border-radius: 16px; background: #e9f8d8; padding: 4px; display: flex; flex-direction: column; align-items: center; color: var(--ink); touch-action: manipulation; }
.ld-animal .art { width: 60px; height: 60px; }
.ld-animal small { font-weight: 800; font-size: 11.5px; text-align: center; line-height: 1.1; }
.ld-animal.hungry { background: #fff1c9; }
.ld-animal.busy .art { animation: breathe 1.4s ease-in-out infinite; }
.ld-animal.ready { background: var(--lime); }
.ld-prod { position: absolute; top: -8px; right: -6px; width: 30px; height: 30px; animation: hop .6s ease-in-out infinite alternate; }
.ld-prod .art { width: 30px; height: 30px; }
.ld-animal.buy { background: rgba(255,255,255,.5); border-style: dashed; justify-content: center; min-height: 86px; }
.ld-card.machine { align-items: center; }
.ld-card.machine.done { background: #eaffd6; }
.ld-recipe { display: flex; flex-direction: column; gap: 4px; }
.ld-needs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ld-need { display: inline-flex; align-items: center; gap: 1px; background: #ffe0dc; border-radius: 10px; padding: 1px 6px 1px 2px; }
.ld-need.ok { background: #e2f8cf; }
.ld-need .art { width: 24px; height: 24px; }
.ld-need b { font-family: var(--body); font-weight: 800; font-size: 12px; }
.ld-arrow { font-weight: 900; }
.ld-time { font-family: var(--display); font-size: 16px; }
.ld-card .ld-bar { position: static; margin-top: 2px; background: rgba(26,16,51,.15); }
.ld-order { display: flex; gap: 8px; align-items: center; background: var(--white); border: var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 4px 0 #4e7a2a; }
.ld-order.can { background: #fff8d6; }
.ld-face { flex: none; width: 50px; }
.ld-face svg { width: 50px; height: 60px; }
.ld-order-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ld-order-body > b { font-family: var(--display); font-weight: 400; font-size: 16px; }
.ld-order-body small { font-size: 12.5px; font-weight: 700; }
.ld-order-btns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.ld-order-btns .btn[disabled] { opacity: .45; }
.ld-skip { border: 0; background: none; font-size: 12px; font-weight: 800; color: var(--muted); text-decoration: underline; }
.ld-wait { text-align: center; font-weight: 700; font-size: 14px; margin: 4px 0; }
.ld-market { display: flex; flex-direction: column; gap: 6px; }
.ld-sell { display: flex; align-items: center; gap: 8px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 14px; padding: 5px 8px; }
.ld-sell > div { flex: 1; min-width: 0; }
.ld-sell b { font-family: var(--display); font-weight: 400; font-size: 15px; display: block; }
.ld-sell small { font-size: 12px; font-weight: 700; color: var(--muted); }
.ld-sell .btn { font-size: 12.5px; padding: 4px 8px; }

/* sheet inside the game */
.ld-sheet-wrap { position: absolute; inset: 0; z-index: 5; }
.ld-sheet-wrap[hidden] { display: none; }
.ld-sheet-bg { position: absolute; inset: 0; background: rgba(26,16,51,.55); opacity: 0; transition: opacity .2s; }
.ld-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85%; overflow-y: auto; background: var(--white); border-top: var(--line); border-radius: 26px 26px 0 0; padding: 10px 16px calc(var(--safe-b) + 16px); transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.9,.3,1.1); }
.ld-sheet-wrap.open .ld-sheet-bg { opacity: 1; }
.ld-sheet-wrap.open .ld-sheet { transform: none; }
.ld-sheet h2 { font-size: 24px; margin-bottom: 10px; }
.ld-seeds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ld-seed { border: var(--line); border-radius: 16px; background: #f4fbe9; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 3px 0 var(--ink); color: var(--ink); }
.ld-seed .art { width: 46px; height: 46px; }
.ld-seed b { font-family: var(--display); font-weight: 400; font-size: 14px; }
.ld-seed small { font-size: 11px; font-weight: 700; color: var(--muted); }
.ld-seed span { font-family: var(--display); font-size: 14px; color: var(--tang); }
.ld-seed.poor { opacity: .5; }
.ld-levelup { text-align: center; }
.ld-big { font-size: 60px; }
.ld-levelup p { font-weight: 700; margin: 4px 0; }
.ld-new, .ld-bagview { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0; }
.ld-new span, .ld-bagview span { display: flex; flex-direction: column; align-items: center; width: 70px; }
.ld-new .art, .ld-bagview .art { width: 44px; height: 44px; }
.ld-new small, .ld-bagview small { font-size: 11.5px; font-weight: 700; text-align: center; }
.ld-bagview b { font-family: var(--display); font-weight: 400; font-size: 15px; }
.ld-toast { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 80px); transform: translateX(-50%); background: var(--ink); color: var(--white); font-weight: 700; padding: 8px 14px; border-radius: 14px; width: max-content; max-width: 88%; text-align: center; z-index: 6; }
.ld-toast[hidden] { display: none; }
.ld-toast.show { animation: popin .3s; }
.ld-fly { position: absolute; width: 32px; height: 32px; z-index: 7; pointer-events: none; }
.ld-fly .art { width: 32px; height: 32px; }
.ld-bee { animation: steam 1s ease-in-out infinite; }
.ld-smoke { animation: steam 1.2s ease-in-out infinite; }

/* ---------- 3D worlds (shared by Ladang 3D and Kedai 3D) */
.ld3 { position: relative; height: 100%; overflow: hidden; background: #9fdcff; color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.w3-host { position: absolute; inset: 0; }
.w3-canvas { display: block; touch-action: none; }
.ld3 .ld-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; background: rgba(59,31,116,.88); }
.ld3 .ld-hint { position: absolute; left: 12px; right: 12px; top: calc(var(--safe-t) + 62px); z-index: 3; border-radius: 14px; background: rgba(26,16,51,.85); }
.w3-side { position: absolute; right: 10px; top: calc(var(--safe-t) + 104px); z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.w3-side button { position: relative; width: 48px; height: 48px; border: var(--line); border-radius: 16px; background: var(--white); font-size: 24px; box-shadow: 0 4px 0 var(--ink); padding: 0; }
.w3-side button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.w3-side .ld-dot { top: -4px; right: -4px; }
.w3-stick { position: absolute; left: 18px; bottom: calc(var(--safe-b) + 22px); z-index: 3; width: 128px; height: 128px; border-radius: 50%; background: rgba(255,255,255,.35); border: 3px solid rgba(26,16,51,.55); touch-action: none; }
.w3-stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--white); border: var(--line); box-shadow: 0 4px 0 var(--ink); pointer-events: none; }
.w3-act { position: absolute; right: 16px; bottom: calc(var(--safe-b) + 26px); z-index: 3; width: 124px; min-height: 104px; border: var(--line); border-radius: 30px; background: var(--lime); box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; color: var(--ink); animation: popin .25s; }
.w3-act[hidden] { display: none; }
.w3-act span { font-size: 32px; line-height: 1; }
.w3-act b { font-family: var(--display); font-weight: 400; font-size: 15px; line-height: 1.1; text-align: center; }
.w3-act.busy { background: #e8e3f7; }
.w3-act:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.w3-quick { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 160px); z-index: 3; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.w3-quick .btn { pointer-events: auto; font-size: 14px; }
.ld3 .ld-sheet-wrap { z-index: 6; }
.ld3 .ld-toast { z-index: 7; bottom: calc(var(--safe-b) + 150px); }
.ld-needs.big .art { width: 40px; height: 40px; }
.ld-needs.big { justify-content: center; margin: 8px 0; }

/* Kedai 3D */
.kd3-screen { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; }
.kd3-screen[hidden] { display: none; }
.kd3-hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.kd3-hud > * { pointer-events: auto; }
.kd3-hud .kd-hud { position: absolute; left: 0; right: 0; top: 0; background: rgba(59,31,116,.9); }
.kd3-hud .kd-hint { position: absolute; left: 12px; right: 12px; top: calc(var(--safe-t) + 64px); border-radius: 14px; background: rgba(26,16,51,.86); min-height: 30px; }
.kd3-hud .kd-hint:empty { display: none; }
.kd3-hud .kd-hint.good { background: #2f7a22; color: #fff; }
.kd3-carry { position: absolute; left: 12px; right: 12px; top: calc(var(--safe-t) + 104px); display: flex; gap: 8px; align-items: center; pointer-events: none; }
.kd3-hand { width: 58px; height: 50px; border-radius: 16px; background: rgba(255,255,255,.9); border: var(--line); display: grid; place-items: center; }
.kd3-hand .art { width: 54px; height: 46px; }
.kd3-hand small { font-size: 9.5px; font-weight: 800; text-align: center; line-height: 1.1; color: var(--muted); }
.kd3-tray { display: flex; gap: 4px; background: rgba(154,160,184,.9); border: var(--line); border-radius: 14px; padding: 4px; }
.kd3-tray i { width: 38px; height: 38px; border-radius: 9px; border: 2px dashed rgba(26,16,51,.4); display: grid; place-items: center; background: rgba(255,255,255,.3); }
.kd3-tray .art { width: 34px; height: 34px; }
.kd3 .kd-prep { padding-top: calc(var(--safe-t) + 66px); }
