/* Kleinholz (js/holzui.js): the 3D canvas, a warm wooden HUD, the workshop panel, start card. */

.hz { position: absolute; inset: 0; overflow: hidden; background: #9fd8f0; font-family: 'Nunito', sans-serif; color: #3a2414; user-select: none; -webkit-user-select: none; }
.hz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.hz-hud { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.hz-money { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px; background: #fff6e4; border: 3px solid #6b4226; box-shadow: 0 4px 0 #6b4226; font: 900 24px 'Nunito', sans-serif; color: #4a2c14; width: max-content; }
.hz-money i { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe98a, #f2b01e 60%, #b97a0a); border: 2px solid #8a5a08; }
.hz-load { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.hz-bar { width: 150px; height: 14px; border-radius: 8px; background: rgba(40, 24, 10, .55); border: 2px solid #fff6e4; overflow: hidden; }
.hz-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c98a4a, #e9c98f); transition: width .15s; }
.hz-bar i.full { background: linear-gradient(90deg, #f05a3a, #ffb03a); animation: hz-blink .6s infinite alternate; }
@keyframes hz-blink { to { filter: brightness(1.3); } }

.hz-goal { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; max-width: min(520px, 60vw); text-align: center; }
.hz-goal span { padding: 4px 12px; border-radius: 999px; background: rgba(40, 24, 10, .6); color: #fff6e4; font-weight: 800; font-size: 13px; }
.hz-goal b { color: #ffd46a; }
.hz-goal .hz-here { background: #fff6e4; color: #4a2c14; border: 2px solid #6b4226; font-weight: 900; font-size: 14px; }

.hz-btns { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.hz-btns button { width: 42px; height: 42px; border-radius: 12px; border: 3px solid #6b4226; background: #fff6e4; box-shadow: 0 3px 0 #6b4226; font: 900 18px 'Nunito', sans-serif; color: #4a2c14; cursor: pointer; }
.hz-btns button:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4226; }

.hz-pops { position: absolute; inset: 0; pointer-events: none; }
.hz-pop { position: absolute; transform: translate(-50%, -50%); font: 900 22px 'Nunito', sans-serif; color: #fff; text-shadow: 0 2px 0 #6b4226, 0 0 6px rgba(0, 0, 0, .4); animation: hz-rise 1.1s ease-out forwards; white-space: nowrap; }
.hz-pop.gold { color: #ffd84a; }
.hz-pop.small { font-size: 16px; }
@keyframes hz-rise { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -60px; } }

.hz-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 14px; background: #f05a3a; color: #fff; font-weight: 900; box-shadow: 0 4px 0 #9a2a14; pointer-events: none; animation: hz-bob 1s ease-in-out infinite alternate; white-space: nowrap; }
.hz-hint[hidden] { display: none; }
@keyframes hz-bob { to { transform: translate(-50%, -4px); } }

.hz-banner { position: absolute; top: 28%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 30px; border-radius: 22px; background: #fff6e4; border: 4px solid #6b4226; box-shadow: 0 6px 0 #6b4226, 0 20px 40px rgba(0, 0, 0, .25); pointer-events: none; text-align: center; }
.hz-banner[hidden] { display: none; }
.hz-banner b { font: 900 clamp(22px, 4vw, 34px) 'Nunito', sans-serif; color: #4a2c14; }
.hz-banner span { font-weight: 800; color: #8a5a32; }
.hz-banner.go { animation: hz-pop-in .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes hz-pop-in { from { transform: translateX(-50%) scale(.4); opacity: 0; } }

.hz-joy { position: absolute; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 50%; background: rgba(255, 246, 228, .25); border: 3px solid rgba(255, 246, 228, .7); pointer-events: none; }
.hz-joy[hidden] { display: none; }
.hz-joy i { position: absolute; left: 28px; top: 28px; width: 44px; height: 44px; border-radius: 50%; background: #fff6e4; border: 3px solid #6b4226; }

.hz-shop { position: absolute; right: 12px; top: 64px; bottom: 12px; width: min(380px, calc(100% - 24px)); display: flex; flex-direction: column; pointer-events: none; }
.hz-shop[hidden] { display: none; }
.hz-shop-card { pointer-events: auto; position: relative; overflow-y: auto; max-height: 100%; padding: 18px 16px 16px; border-radius: 20px; background: #fff6e4; border: 4px solid #6b4226; box-shadow: 0 6px 0 #6b4226, 0 24px 40px rgba(0, 0, 0, .3); box-sizing: border-box; animation: hz-slide .25s ease-out; }
@keyframes hz-slide { from { transform: translateX(30px); opacity: 0; } }
.hz-shop h2 { margin: 0 0 10px; font: 900 26px 'Nunito', sans-serif; color: #4a2c14; }
.hz-shop h3 { margin: 16px 0 8px; font: 900 16px 'Nunito', sans-serif; color: #8a5a32; text-transform: uppercase; letter-spacing: .06em; }
.hz-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; border: 2px solid #6b4226; background: #fff; font: 900 20px 'Nunito', sans-serif; color: #4a2c14; cursor: pointer; }
.hz-ladder { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.hz-ladder i { font-style: normal; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #ead7b6; filter: grayscale(1); opacity: .5; font-size: 18px; }
.hz-ladder i.have { filter: none; opacity: .75; }
.hz-ladder i.now { filter: none; opacity: 1; background: #ffd46a; box-shadow: 0 0 0 2px #6b4226; }
.hz-tool { display: grid; grid-template-columns: 54px 1fr; gap: 6px 12px; align-items: center; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #ffe7a8, #ffd46a); border: 3px solid #6b4226; }
.hz-tool.done { grid-template-columns: 1fr; text-align: center; }
.hz-tool-ic { width: 54px; height: 54px; border-radius: 14px; background: #fff6e4; display: grid; place-items: center; font-size: 30px; border: 2px solid #6b4226; }
.hz-tool b { display: block; font-size: 18px; font-weight: 900; }
.hz-tool small, .hz-up small { display: block; font-weight: 700; color: #7a5232; font-size: 12px; }
.hz-tool button { grid-column: 1 / -1; }
.hz-up { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 2px dashed #e2c9a0; }
.hz-up b { font-weight: 900; font-size: 15px; }
.hz-pips { display: flex; gap: 2px; margin-top: 4px; flex-wrap: wrap; }
.hz-pips i { width: 7px; height: 7px; border-radius: 2px; background: #5bb04a; }
.hz-shop button[data-buy] { font: 900 14px 'Nunito', sans-serif; padding: 9px 14px; border-radius: 12px; border: 3px solid #2f6b22; background: #6cc24a; color: #fff; box-shadow: 0 3px 0 #2f6b22; cursor: pointer; white-space: nowrap; text-shadow: 0 1px 0 #2f6b22; }
.hz-shop button[data-buy]:active { transform: translateY(2px); box-shadow: 0 1px 0 #2f6b22; }
.hz-shop button[data-buy]:disabled { background: #cbb89a; border-color: #8a7458; box-shadow: 0 3px 0 #8a7458; text-shadow: none; cursor: default; }

.hz-start { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(40, 24, 10, .25), rgba(40, 24, 10, .6)); }
.hz-start[hidden] { display: none; }
.hz-start-card { max-width: 460px; padding: 26px 26px 22px; border-radius: 26px; background: #fff6e4; border: 4px solid #6b4226; box-shadow: 0 8px 0 #6b4226, 0 30px 60px rgba(0, 0, 0, .35); text-align: center; }
.hz-start h1 { margin: 0; font: 900 clamp(44px, 9vw, 64px) 'Nunito', sans-serif; letter-spacing: -.03em; color: #4a2c14; line-height: 1; }
.hz-start h1 span { color: #d9762a; }
.hz-start p { font-weight: 700; color: #7a5232; margin: 10px 0 14px; }
.hz-start ul { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.hz-start li { padding: 7px 12px; border-radius: 12px; background: #f6e7c8; }
.hz-start li b { color: #4a2c14; display: inline-block; min-width: 92px; }
.hz-start-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hz-go { font: 900 22px 'Nunito', sans-serif; padding: 13px 34px; border-radius: 16px; border: 4px solid #2f6b22; background: #6cc24a; color: #fff; box-shadow: 0 5px 0 #2f6b22; cursor: pointer; text-shadow: 0 2px 0 #2f6b22; }
.hz-go:active { transform: translateY(3px); box-shadow: 0 2px 0 #2f6b22; }
.hz-reset { font: 800 14px 'Nunito', sans-serif; padding: 10px 16px; border-radius: 14px; border: 2px solid #b08a62; background: transparent; color: #8a5a32; cursor: pointer; }
.hz-stand { font-size: 13px; margin: 14px 0 0 !important; }

@media (max-width: 640px) {
	.hz-goal { top: auto; bottom: 64px; max-width: calc(100vw - 24px); }
	.hz-goal span:not(.hz-here) { font-size: 11px; }
	.hz-money { font-size: 19px; }
	.hz-bar { width: 110px; }
	.hz-shop { top: auto; height: 62%; right: 8px; left: 8px; width: auto; }
	.hz-hint { bottom: 120px; white-space: normal; text-align: center; }
}

/* The map (bottom left; tap or M for the big one). */
.hz-map { position: absolute; left: 12px; bottom: 12px; padding: 5px; border-radius: 12px; background: rgba(40, 24, 10, .55); border: 2px solid #fff6e4; cursor: pointer; line-height: 0; }
.hz-map canvas { display: block; border-radius: 7px; }
.hz-map.big { left: 50%; bottom: auto; top: 50%; transform: translate(-50%, -50%); padding: 10px; background: rgba(40, 24, 10, .82); z-index: 5; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.hz-pop.big { font-size: 30px; }
@media (max-width: 640px) { .hz-map:not(.big) { bottom: auto; top: 96px; } }
