@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../assets/fonts/nunito-latin-variable.woff2") format("woff2");
}
:root {
  --ui-font3d: "Nunito", ui-rounded, "Segoe UI", sans-serif;
  color-scheme: light;
  --ink3d: #183d32;
  --muted3d: #4f6659;
  --paper3d: #f6f6eb;
  --glass3d: rgba(249, 250, 239, .95);
  --edge3d: #fdfdf5;
  --teal3d: #184b3d;
  --honey3d: #e9bf65;
  --comb-hex3d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M27 3H73Q77 3 79 7L97 44Q100 50 97 56L79 93Q77 97 73 97H27Q23 97 21 93L3 56Q0 50 3 44L21 7Q23 3 27 3Z'/%3E%3C/svg%3E");
  --comb-cap3d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M14 2H86Q90 2 92 7L98 44Q100 50 98 56L92 93Q90 98 86 98H14Q10 98 8 93L2 56Q0 50 2 44L8 7Q10 2 14 2Z'/%3E%3C/svg%3E");
  --comb-panel3d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M8 1H97Q99 1 99 3V91Q99 93 97 95L94 98Q93 99 91 99H3Q1 99 1 97V9Q1 7 3 5L6 2Q7 1 8 1Z'/%3E%3C/svg%3E");
  --comb-hex-edge3d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M27 3H73Q77 3 79 7L97 44Q100 50 97 56L79 93Q77 97 73 97H27Q23 97 21 93L3 56Q0 50 3 44L21 7Q23 3 27 3Z' fill='none' stroke='%23cfad68' stroke-width='1.3' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --comb-cap-edge3d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M14 2H86Q90 2 92 7L98 44Q100 50 98 56L92 93Q90 98 86 98H14Q10 98 8 93L2 56Q0 50 2 44L8 7Q10 2 14 2Z' fill='none' stroke='%23cfad68' stroke-width='1.3' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --comb-panel-edge3d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M8 1H97Q99 1 99 3V91Q99 93 97 95L94 98Q93 99 91 99H3Q1 99 1 97V9Q1 7 3 5L6 2Q7 1 8 1Z' fill='none' stroke='%23cfad68' stroke-width='1.2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --safe-top3d: max(12px, env(safe-area-inset-top));
  --safe-right3d: max(16px, env(safe-area-inset-right));
  --safe-bottom3d: max(14px, env(safe-area-inset-bottom));
  --safe-left3d: max(16px, env(safe-area-inset-left));
  font-family: var(--ui-font3d);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html:has(body.alibee-3d), body.alibee-3d { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body.alibee-3d { position: fixed; inset: 0; color: var(--ink3d); background: #a8bd96; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
body.alibee-3d button, body.alibee-3d select { font: inherit; }
body.alibee-3d button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.alibee-3d button:focus-visible, body.alibee-3d select:focus-visible, #world3d:focus-visible { outline: 3px solid #f2ca73; outline-offset: 3px; }
body.alibee-3d button:disabled { cursor: default; }
#world3d { display: block; position: absolute; inset: 0; width: 100%; height: 100%; height: 100dvh; touch-action: none; outline: none; }
.sr-only3d { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; border: 0 !important; }
.hud3d { position: absolute; inset: 0 0 auto; z-index: 5; height: 64px; pointer-events: none; }
.brand3d, .timer3d, .system3d { position: absolute; }
.brand3d { top: var(--safe-top3d); left: var(--safe-left3d); display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 10px 4px 7px; border: 1px solid #fff; border-radius: 14px; color: var(--ink3d); background: var(--glass3d); box-shadow: 0 2px 8px #122e2520; text-decoration: none; pointer-events: auto; }
.brand3d svg { flex: none; width: 26px; height: 26px; }
.brand3d strong { font-weight: 720; letter-spacing: -.055em; font-size: 27px; line-height: 1; }
.timer3d { top: var(--safe-top3d); left: 50%; transform: translateX(-50%); min-width: 82px; padding: 7px 12px; border: 1px solid #f1f4de; border-radius: 15px; color: #fffcee; background: #173f33; box-shadow: 0 3px 11px #142f2530; text-align: center; font-variant-numeric: tabular-nums; }
.timer3d > div { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.timer3d strong { font-size: 28px; line-height: 1; font-weight: 680; letter-spacing: -.04em; }
#seconds-unit3d { color: #eff4dc; font-size: 12px; font-weight: 550; }
.timer3d.is-urgent { background: #873d29; border-color: #f6d69c; }
.system3d { top: var(--safe-top3d); right: var(--safe-right3d); display: flex; gap: 7px; pointer-events: auto; }
.system3d button, .icon3d { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #fffdf3; border-radius: 14px; color: #183f32; background: var(--glass3d); box-shadow: 0 2px 8px #14332724; font-size: 19px; }
.system3d svg { width: 21px; height: 21px; }
.system3d button[aria-pressed="true"], .icon3d[aria-pressed="true"] { background: #234e3e; color: #fff9e5; border-color: #e8c56e; }
.field-status3d { position: absolute; z-index: 3; inset: 0; pointer-events: none; font-variant-numeric: tabular-nums; }
.cargo3d { position: absolute; top: var(--safe-top3d); left: var(--safe-left3d); display: grid; grid-template-columns: 23px 1fr; grid-template-rows: 1fr 3px; gap: 2px 6px; width: 102px; height: 44px; padding: 4px 9px 5px; border: 1px solid #fffdf1; border-radius: 10px 4px; background: var(--glass3d); color: #173f32; pointer-events: none; }
.cargo-icon3d { grid-column: 1; grid-row: 1 / 3; align-self: center; width: 22px; height: 27px; color: #745927; }
.cargo-head3d { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-content: center; gap: 1px 4px; min-width: 0; }
.cargo-head3d > .eyebrow3d { flex: 0 0 100%; color: #4b624d; font-size: 9px; line-height: 1; font-weight: 650; letter-spacing: .07em; }
#cargo-count3d { font-size: 18px; line-height: 1; font-weight: 720; letter-spacing: -.035em; white-space: nowrap; }
#cargo-pips3d { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; height: 3px; }
#cargo-pips3d > i { min-width: 0; height: 3px; border: 1px solid #a7b79d; border-radius: 2px; background: #e0e6d6; }
#cargo-pips3d > .filled { background: #bc8122; border-color: #a36d19; }
.cargo3d.is-full { border-color: #9c6a19; background: #f5df9d; box-shadow: 0 0 0 1px #fff3cb, 0 3px 10px #173b2829; }
.objective-dock3d { position: absolute; left: 50%; bottom: var(--safe-bottom3d); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; }
.objective3d { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: 12px 18px 2px; gap: 0 7px; align-items: center; width: 142px; height: 44px; padding: 5px 10px; border: 1px solid #c4b17b; border-radius: 11px 4px; background: #f7f7ebf5; box-shadow: 0 2px 7px #183a2d22; }
.objective3d > svg { grid-column: 1; grid-row: 1 / 3; width: 23px; height: 26px; color: #785c25; }
#objective-label3d { grid-column: 2; grid-row: 1; color: #4a624d; font-size: 10px; line-height: 1; white-space: nowrap; }
#delivery3d { grid-column: 2; grid-row: 2; font-size: 17px; line-height: 1; font-weight: 720; white-space: nowrap; }
#objective-meter3d { grid-column: 1 / -1; grid-row: 3; appearance: none; display: block; width: 100%; height: 2px; margin: 0; border: 0; border-radius: 3px; overflow: hidden; background: #d4deca; }
#objective-meter3d::-webkit-progress-bar { background: #d4deca; }
#objective-meter3d::-webkit-progress-value { background: #477449; border-radius: 3px; }
#objective-meter3d::-moz-progress-bar { background: #477449; border-radius: 3px; }
.recipe-hud3d { position: absolute; top: calc(var(--safe-top3d) + 64px); bottom: auto; left: var(--safe-left3d); transform: none; width: calc(var(--recipe-columns, 4) * 116px + (var(--recipe-columns, 4) - 1) * 4px); max-width: calc(100vw - var(--safe-left3d) - var(--safe-right3d)); pointer-events: none; }
.recipe3d { display: grid; grid-template-columns: repeat(var(--recipe-columns, 4), minmax(0, 1fr)); gap: 4px; }
.recipe-chip3d { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 5px 7px; border-radius: 5px; background: #f7f7ebf5; color: #34533b; font-size: 13px; line-height: 1.2; box-shadow: 0 2px 5px #183a2d20; }
.recipe-chip3d > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-chip3d > b { flex: none; color: #24492f; font-size: 15px; font-weight: 700; }
.recipe-chip3d.is-complete { background: #dce8cb; }
.field-status3d:has(#recipe-hud3d:not([hidden])) .context3d { bottom: calc(var(--safe-bottom3d) + 56px); }
@media (max-width: 499px) {
  .recipe-hud3d { width: calc(var(--recipe-mobile-columns, 2) * 120px + (var(--recipe-mobile-columns, 2) - 1) * 4px); }
  .recipe3d { grid-template-columns: repeat(var(--recipe-mobile-columns, 2), minmax(0, 1fr)); }
  .field-status3d:has(#recipe-hud3d:not([hidden])) .context3d { bottom: calc(var(--safe-bottom3d) + 56px); }
}
.cargo-vitals3d { position: absolute; left: 11px; bottom: 4px; display: flex; width: 20px; min-width: 0; }
.cargo-vitals3d:has(#energy3d[hidden]) { display: none; }
.health3d { --health-impact: 0; position: absolute; top: calc(var(--safe-top3d) + 8px); left: calc(var(--safe-left3d) + 108px); display: flex; align-items: center; gap: 5px; width: 98px; height: 28px; min-height: 28px; padding: 5px 7px; border: 1px solid #b2cab7; border-radius: 10px; color: #285a40; background: #f6faed; box-shadow: 0 2px 7px #183a2d22; }
.health3d > svg { flex: none; width: 13px; height: 13px; }
.health3d > strong { min-width: 24px; color: #244b36; font-size: 13px; line-height: 1; text-align: right; font-weight: 720; }
.health-track3d { position: relative; flex: 1; min-width: 20px; height: 5px; overflow: hidden; border-radius: 4px; background: #cad8c5; }
#health-trail3d { position: absolute; inset: 0; background: #c68e49; transform-origin: left; }
.health3d progress { position: absolute; inset: 0; appearance: none; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 4px; background: transparent; }
.health3d progress::-webkit-progress-bar { background: transparent; }
.health3d progress::-webkit-progress-value { background: #347b50; border-radius: 4px; }
.health3d progress::-moz-progress-bar { background: #347b50; border-radius: 4px; }
#health-change3d { position: absolute; top: calc(100% + 4px); left: 20px; min-width: 32px; padding: 4px 5px; border: 1px solid #a4bc9b; border-radius: 5px; font-size: 12px; line-height: 1; font-weight: 750; text-align: center; background: #e2efda; color: #286240; }
#health-change3d[hidden] { display: none; }
.health3d.is-low, .health3d.is-damaged { color: #9b4432; border-color: #a65b43; }
.health3d.is-damaged { box-shadow: 0 0 0 calc(var(--health-impact) * 3px) #a65b4340, 0 2px 7px #183a2d22; }
.health3d.is-damaged #health-change3d { color: #fff9ed; background: #a34f38; }
.health3d.is-low progress::-webkit-progress-value { background: #ad553a; }
.health3d.is-low progress::-moz-progress-bar { background: #ad553a; }
.health3d.is-healed { color: #267147; border-color: #40815d; box-shadow: 0 0 0 calc(var(--health-impact) * 3px) #40815d40, 0 2px 7px #183a2d22; }
.health3d.is-reduced, .health3d.is-feedback-paused { --health-impact: 0 !important; }
#energy3d { appearance: none; flex: 1; min-width: 12px; max-width: 40px; width: 24px; height: 3px; margin: 0; border: 0; overflow: hidden; border-radius: 3px; }
#energy3d::-webkit-progress-bar { background: #cfdbcb; }
#energy3d::-webkit-progress-value { background: #2b6650; border-radius: 3px; }
#energy3d::-moz-progress-bar { background: #2b6650; border-radius: 3px; }
.cargo3d.is-low-energy #energy3d::-webkit-progress-value { background: #9a4b27; }
.cargo-footer3d { position: absolute; left: 50%; bottom: calc(var(--safe-bottom3d) + 56px); transform: translateX(-50%); width: clamp(160px, calc(100vw - var(--safe-right3d) - var(--safe-right3d) - 292px), 300px); min-height: 28px; padding: 5px 9px; border: 1px solid #c3cdb1; border-radius: 8px 3px; background: #f5f7e9f2; box-shadow: 0 2px 6px #173e3222; }
.cargo-footer3d:has(#nearby3d[hidden]):has(#notice3d[hidden]) { display: none; }
.cargo-footer3d:has(#notice3d:not([hidden])) .nearby3d { display: none; }
.cargo-footer3d:has(#notice3d:not([hidden])) .guide-hint3d, .cargo-footer3d:has(#guide-hint3d:not([hidden])) .nearby3d { display: none; }
.nearby3d { display: flex; align-items: baseline; gap: 4px; min-width: 0; line-height: 1.2; }
.nearby3d strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.nearby3d small { flex: none; margin-left: auto; white-space: nowrap; color: #4b614a; font-size: 12px; font-weight: 550; }
.nearby3d.is-selected strong, .nearby3d[data-state="harvesting"] strong { color: #225b38; }
.nearby3d[data-state="occupied"] small, .nearby3d[data-state="full"] small { color: #855e24; }
.notice3d, .guide-hint3d { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #705124; font-size: 12px; font-weight: 600; line-height: 1.3; }
.guide-hint3d { color: #264e38; }
.recipe3d[hidden], .recipe-hud3d[hidden], .nearby3d[hidden], .notice3d[hidden], .guide-hint3d[hidden], .health3d[hidden], #energy3d[hidden], #objective-meter3d[hidden] { display: none; }
.touch3d { position: absolute; z-index: 4; inset: 0; pointer-events: none; user-select: none; -webkit-user-select: none; touch-action: none; }
#joystick3d { --joy-x: 90px; --joy-y: calc(100% - 80px); position: absolute; inset: 0 auto 0 0; width: 50vw; height: 100%; height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left); pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; }
#joystick3d::before { content: ""; position: absolute; left: var(--joy-x); top: var(--joy-y); width: 108px; height: 108px; transform: translate(-50%, -50%); border: 2px solid #305941; border-radius: 50%; background: rgba(248,252,231,.12); box-shadow: 0 0 0 1px #f5f7dfc9, inset 0 0 0 1px #f5f7df82; transition: background-color .12s, border-color .12s; }
#stick3d { position: absolute; left: var(--joy-x); top: var(--joy-y); width: 38px; height: 38px; transform: translate(-50%, -50%); border: 2px solid #214f3d; border-radius: 50%; background: #f5f8df; box-shadow: 0 2px 7px #102f2845; pointer-events: none; }
#stick3d::after { content: ""; position: absolute; inset: 12px; border: 1.5px solid #315c42; border-radius: 50%; }
#joystick3d.is-active::before { border-color: #faf8d8; background: #254f3f24; box-shadow: 0 0 0 1px #2b543d; }
#joystick3d.is-active #stick3d { background: #214e3c; border-color: #fffbe0; }
#joystick3d.is-active #stick3d::after { border-color: #f7dfa0; }
#joystick3d.is-disabled { visibility: hidden; pointer-events: none; }
.joystick-label3d { position: absolute; top: calc(var(--joy-y) + 60px); left: var(--joy-x); transform: translateX(-50%); padding: 3px 7px; border: 1px solid #fcffeb; border-radius: 7px; background: #f0f5df; color: #244f3b; font-size: 10px; line-height: 1; font-weight: 650; letter-spacing: .08em; pointer-events: none; }
.action3d { position: absolute; right: var(--safe-right3d); bottom: var(--safe-bottom3d); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; width: 64px; height: 64px; border: 1.5px solid #fff9df; border-radius: 50%; color: #173f32; background: #f3f5e5; box-shadow: 0 0 0 1px #365e453d, 0 3px 9px #122f2840; pointer-events: auto; touch-action: none; font-size: 12px; font-weight: 650; line-height: 1.1; transition: background-color .12s, box-shadow .12s, transform .12s; }
.action3d svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action3d > span:first-child:not(:last-child), .action3d .symbol3d { font-size: 23px; line-height: 1; font-weight: 600; }
.action3d small { font-size: 12px; font-weight: 650; line-height: 1; }
.boost3d { right: calc(var(--safe-right3d) + 74px); bottom: calc(var(--safe-bottom3d) + 5px); width: 72px; height: 72px; color: #fff9e5; background: #174d3a; border-color: #fff2c9; }
.land3d { bottom: calc(var(--safe-bottom3d) + 64px); }
.home3d { width: 52px; height: 52px; }
.home3d > span:first-child:not(:last-child) { font-size: 20px; }
.home3d small { font-size: 10px; }
.home3d svg { width: 20px; height: 20px; }
#boost-meter3d { position: absolute; left: 25%; right: 25%; bottom: 9px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #f1c85e calc(var(--charge, 1) * 100%), #55775d calc(var(--charge, 1) * 100%)); }
.boost3d::after { display: none; }
.boost3d.is-cooling { border-color: #efd38b; background: #315b45; }
.boost3d.is-cooling::after { content: attr(data-cooldown); position: absolute; top: -2px; right: -2px; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #785322; border-radius: 50%; background: #f3d68b; color: #294a35; font-size: 12px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.boost3d.is-tired:not(.is-cooling)::after { content: "!"; position: absolute; top: -2px; right: -2px; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #785322; border-radius: 50%; background: #f3d68b; color: #294a35; font-size: 12px; font-weight: 700; }
.land3d.is-landed { color: #2d482f; border-color: #7c5b20; background: #f3d78f; }
.home3d.is-returning { color: #fffbe8; background: #285a47; border-color: #f3d084; box-shadow: 0 0 0 2px #e5bb5d, 0 3px 9px #122f2840; }
.action3d.is-held, .action3d:active { transform: scale(.97); box-shadow: inset 0 2px 5px #122f2840, 0 0 0 1px #fff7d2; }
.action3d:disabled { visibility: hidden; pointer-events: none; }
/* State changes stay brief and spatially fixed; the flight remains the focus. */
.system3d button, .icon3d { box-shadow: 0 0 0 1px #234e3c80, 0 3px 9px #122f2838; transition: background-color .12s, border-color .12s, box-shadow .12s, transform .12s; }
.action3d { box-shadow: 0 0 0 1px #214e3ca6, 0 4px 10px #122f284d; }
.system3d button:focus-visible, .action3d:focus-visible { outline: 3px solid #234e3c; outline-offset: 4px; border-color: #fff7d5; box-shadow: 0 0 0 3px #f8dfa0, 0 4px 11px #122f284d; }
.system3d button:active { transform: translateY(1px); background: #e6edce; box-shadow: inset 0 2px 4px #143c3033, 0 0 0 2px #244c38; }
.action3d.is-held, .action3d:active { border-color: #fff6cf; box-shadow: inset 0 2px 6px #122f284d, 0 0 0 2px #234e3c, 0 0 0 4px #f4dfa36b; }
.land3d.is-selected { background: #fff0c3; border-color: #916b28; box-shadow: 0 0 0 2px #fff7d3, 0 4px 11px #122f284d; }
.land3d.is-landing { background: #d9e9bf; border-color: #244e36; box-shadow: 0 0 0 2px #fff7db, 0 0 0 4px #426c47b3, 0 4px 11px #122f284d; }
#joystick3d::before { box-shadow: 0 0 0 2px #f5f7dfd9, inset 0 0 0 1px #f5f7df9e, 0 3px 10px #14352729; }
#joystick3d.is-active::before { border-color: #fff6cf; background: #244d3c40; box-shadow: 0 0 0 2px #244d3c, inset 0 0 0 1px #e8d18f80; }
@media (hover: hover) and (pointer: fine) {
  .system3d button:not(:disabled):hover, .icon3d:not(:disabled):hover { background: #e6eecf; border-color: #456b4d; box-shadow: 0 0 0 2px #f5e4b9, 0 4px 10px #14332740; }
  .system3d button[aria-pressed="true"]:hover { background: #2c6049; color: #fff9e5; }
  .action3d:not(:disabled):hover { border-color: #496d42; box-shadow: 0 0 0 2px #fff3ce, 0 0 0 4px #38624780, 0 4px 12px #122f284d; }
  .boost3d:not(:disabled):hover { background: #276447; }
}
.boost3d.is-boosting, .boost3d.is-boosting:not(:disabled):hover, .boost3d.is-boosting:focus-visible { color: #183e2d; background: #f3cf70; border-color: #fffbea; box-shadow: 0 0 0 2px #82632a, 0 0 0 5px #f6d98573, 0 0 23px #e9c45b9e; }
.boost3d.is-boosting #boost-meter3d { background: #836326; }
.boost3d.is-boosting::after { border-color: #6c592b; background: #fff2b9; }
.overlay3d, dialog.overlay3d { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; margin: 0; padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); border: 0; color: var(--ink3d); background: rgba(19,48,37,.26); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow: auto; overscroll-behavior: contain; }
.overlay3d[hidden], dialog.overlay3d:not([open]) { display: none; }
.overlay3d::backdrop { background: rgba(19,48,37,.26); }
.card3d { width: min(100%, 450px); max-height: 100%; padding: clamp(22px, 4.8vw, 36px); overflow: auto; overscroll-behavior: contain; border-radius: 28px; border: 1px solid rgba(255,255,255,.68); background: rgba(251,249,236,.97); box-shadow: 0 24px 70px rgba(12,40,28,.17); }
.card3d h1, .card3d h2 { margin: 8px 0 14px; font-size: clamp(28px, 5vw, 38px); line-height: 1.06; letter-spacing: -.055em; font-weight: 650; }
.card3d p { margin: 12px 0; color: var(--muted3d); font-size: 15px; line-height: 1.5; }
.card3d .eyebrow3d { color: #64816b; font-size: 10px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.card3d .dedication3d { margin: 16px 0 20px; font-size: 12px; letter-spacing: .26em; color: #89967c; }
.card3d > .dedication3d { display: block; text-align: center; }
.welcome-card3d { text-align: center; }
.welcome-card3d > .eyebrow3d { display: block; max-width: 280px; margin: 0 auto 19px; font-size: 9px; }
.welcome-card3d h1 { font-size: clamp(36px, 5.5vw, 46px); }
.control-legend3d { display: flex; justify-content: center; gap: 19px; margin: 18px 0 15px; color: #6c8070; font-size: 11px; }
.control-legend3d > span { display: flex; flex-direction: column; gap: 3px; }
.control-legend3d b { color: #426653; font-size: 12px; font-weight: 600; }
.desktop-hint3d { display: block; margin-top: 16px; color: #7b8b77; font-size: 10px; line-height: 1.4; }
.card3d .intro3d { margin: 22px 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 14px; line-height: 1.4; color: #3a6153; }
.card3d .intro3d li { display: flex; align-items: baseline; gap: 12px; }
.card3d .intro3d li::before { content: ""; flex: 0 0 4px; width: 4px; height: 4px; border-radius: 50%; background: #c59c55; }
.card3d button { min-height: 52px; padding: 13px 20px; border: 1px solid rgba(34,83,66,.18); border-radius: 16px; color: var(--ink3d); background: transparent; font-size: 15px; font-weight: 600; }
.card3d button.primary3d, .card3d .primary3d { width: 100%; margin-top: 14px; color: var(--paper3d); background: var(--teal3d); border-color: transparent; }
.card3d .secondary3d { display: inline-flex; align-items: center; justify-content: center; width: 100%; margin-top: 10px; min-height: 48px; padding: 12px 18px; border: 1px solid rgba(34,83,66,.16); border-radius: 15px; background: transparent; color: #3b6553; font-size: 13px; text-decoration: none; }
.card3d button:hover { filter: brightness(1.05); }
.card3d a { color: #335e4c; text-underline-offset: 4px; }
.card3d label { display: block; margin: 18px 0 8px; font-size: 13px; color: var(--muted3d); }
.card3d select { display: block; width: 100%; min-height: 52px; padding: 11px 15px; border: 1px solid rgba(34,83,66,.17); border-radius: 14px; color: var(--ink3d); background: #fffdf3; font-size: 15px; }
.card3d .row3d, .card3d .buttons3d { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.card3d .row3d > button, .card3d .buttons3d > button { flex: 1; }
#brief-overlay3d { background: rgba(19,48,37,.19); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.card3d.brief-card3d { display: block; width: min(460px, 100%); max-height: 100%; padding: 16px 20px; overflow: auto; overscroll-behavior: contain; border-radius: 22px; border-color: #fffdf1; background: #f6f6eb; }
.brief-entry3d { position: sticky; top: 0; z-index: 2; padding-bottom: 4px; background: #f6f6eb; }
.card3d.brief-card3d h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.1; }
.brief-card3d #brief-start3d { min-height: 44px; margin: 0; padding: 10px 16px; border-radius: 13px; font-size: 14px; line-height: 1.25; }
#brief-time3d { display: block; margin: 6px 0; color: #4c654f; font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.brief-advice3d { margin-top: 6px; border-top: 1px solid #d5dec9; }
.brief-copy3d { display: list-item; min-height: 44px; padding: 13px 2px; color: #385945; font-size: 13px; line-height: 18px; cursor: pointer; }
.brief-copy3d::marker, .settings-group3d > summary::marker { color: #708260; }
.brief-copy3d:focus-visible, .settings-group3d > summary:focus-visible { outline: 2px solid #6b8357; outline-offset: 2px; border-radius: 3px; }
.brief-advice-content3d { padding-bottom: 2px; }
.brief-advice-content3d p { margin: 0 0 8px; color: #4a6351; font-size: 13px; line-height: 1.4; }
.brief-advice-content3d #brief-goal3d { color: #234b37; }
.brief-advice-content3d #brief-tip3d { margin-bottom: 0; padding-left: 11px; border-left: 2px solid #c3a45e; color: #526449; }
.brief-advice-content3d p:empty, #brief-time3d:empty { display: none; }
.settings-dialog3d { width: min(430px, calc(100vw - 28px)); max-height: calc(100dvh - 18px); padding: 14px 18px; margin: auto; overflow: auto; overscroll-behavior: contain; border-radius: 23px; border: 1px solid rgba(255,255,255,.7); background: var(--paper3d); color: var(--ink3d); box-shadow: 0 24px 70px rgba(12,40,28,.22); }
.settings-dialog3d::backdrop { background: rgba(19,48,37,.29); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.settings-dialog3d .dialog-close3d { position: absolute; z-index: 3; right: 9px; top: 9px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: #426653; font-size: 25px; }
.settings-dialog3d .eyebrow3d { display: block; padding-right: 30px; color: #74886f; font-size: 9px; letter-spacing: .13em; }
.settings-dialog3d h2 { margin: 0 0 10px; padding-right: 42px; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; font-weight: 700; }
.settings-entry3d { position: sticky; top: 0; z-index: 2; background: var(--paper3d); }
.settings-dialog3d .settings-entry3d label { margin: 0 0 5px; font-size: 12px; line-height: 1.2; }
.settings-dialog3d label { display: block; margin: 18px 0 9px; color: #55705f; font-size: 13px; }
.settings-dialog3d select { display: block; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #d8dfc9; border-radius: 14px; background: #fffdf3; color: #294d3b; font-size: 16px; line-height: 1.2; }
.settings-dialog3d p { color: #61775f; font-size: 13px; line-height: 1.5; }
.settings-dialog3d .check3d { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0; font-size: 13px; }
.settings-dialog3d input[type="checkbox"] { flex: none; width: 19px; height: 19px; accent-color: var(--teal3d); }
.settings-dialog3d button:not(.dialog-close3d) { min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid #d3ddc4; background: transparent; color: #395f49; font-size: 13px; font-weight: 550; }
.settings-dialog3d button.primary3d { width: 100%; margin-top: 11px; border: 0; color: var(--paper3d); background: var(--teal3d); }
.settings-dialog3d #settings-play3d { display: block; min-height: 44px; margin: 8px 0; padding: 10px 14px; font-size: 14px; line-height: 1.25; }
.settings-group3d { border-top: 1px solid #d5dec9; }
.settings-group3d > summary { min-height: 44px; padding: 13px 2px; color: #385945; font-size: 13px; line-height: 18px; cursor: pointer; }
.settings-details3d { padding: 2px 0 10px; }
.settings-dialog3d button.secondary3d { width: 100%; margin-top: 12px; }
.profile-tools3d { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 12px; }
.profile-tools3d > button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.profile-tools3d svg { width: 20px; height: 20px; }
.classic-link3d { display: block; margin-top: 19px; min-height: 44px; padding: 13px 0; text-align: center; font-size: 11px; color: #70816a; text-underline-offset: 4px; }
.version3d { display: block; margin-top: 6px; text-align: center; color: #97a08b; font-size: 9px; line-height: 1.4; }
/* The overlay is deliberate reading space; the in-flight console stays compact. */
.card3d { width: min(100%, 410px); padding: clamp(22px, 4vw, 30px); border-radius: 24px; background: #f6f6eb; }
.card3d h1, .card3d h2 { font-weight: 650; }
.card3d p, .card3d .eyebrow3d, .desktop-hint3d { color: #4c6755; }
.card3d .dedication3d { color: #64745c; }
.settings-dialog3d { width: min(430px, calc(100vw - 28px)); padding: 14px 18px; border-radius: 23px; }
.settings-dialog3d .eyebrow3d, .settings-dialog3d label { color: #46614e; }
.version3d, .classic-link3d { color: #66765d; }

.garden-status3d { margin: 0 0 8px; color: #294d37; font-size: 13px; }
.bank3d { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #d5dec9; color: #4a634d; font-size: 12px; font-variant-numeric: tabular-nums; }
.bank3d strong { color: #234a34; font-size: 17px; }
.sound-setting3d { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: #46614e; font-size: 13px; }
.settings-dialog3d .sound-setting3d #sound3d { width: 44px; min-height: 44px; height: 44px; padding: 0; font-size: 19px; }
.action3d kbd { position: absolute; left: -4px; top: -4px; display: grid; place-items: center; min-width: 17px; min-height: 17px; padding: 1px 4px; border: 1px solid #396348; border-radius: 5px; color: #274d36; background: #fff8df; font-family: inherit; font-size: 11px; line-height: 1; font-weight: 650; box-shadow: 0 1px 3px #183a2d26; }
body.is-touch-input .action3d kbd { display: none; }
/* Thumb targets are real rectangular buttons; the comb artwork remains inside.
   The input layer also consumes an8px neutral miss beside these controls. */
body.is-touch-input .land3d { width: 88px; height: 64px; bottom: calc(var(--safe-bottom3d) + 84px); }
body.is-touch-input .home3d { width: 56px; height: 56px; }
body.is-touch-input .boost3d { width: 72px; height: 72px; right: calc(var(--safe-right3d) + 70px); bottom: var(--safe-bottom3d); }
body.is-touch-input .system3d button, body.is-touch-input .icon3d { width: 56px; height: 56px; min-width: 56px; min-height: 56px; }
body.is-touch-input .system3d { isolation: isolate; }
body.is-touch-input .system3d::after { content: ""; position: absolute; inset: -8px; z-index: -1; pointer-events: auto; }
body.alibee-3d.is-touch-input :is(.action3d, .system3d button, .icon3d) { border-radius: 0; }
body.is-touch-input .brand3d { display: none; }
.welcome-touch3d { display: none; }
body.is-touch-input .welcome-desktop3d { display: none; }
body.is-touch-input .welcome-touch3d { display: flex; }
#joystick3d::before, #joystick3d #stick3d, #joystick3d .joystick-label3d { visibility: hidden; }
#joystick3d.is-active::before, #joystick3d.is-active #stick3d { visibility: visible; }
#joystick3d .joystick-label3d { display: none; }
body.is-desktop-input #joystick3d { display: none; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  body:not(.is-touch-input) #joystick3d { display: none; pointer-events: none; }
}
@media (pointer: coarse) {
  body:not(.is-desktop-input) .action3d kbd, body:not(.is-desktop-input) .brand3d, body:not(.is-desktop-input) .welcome-desktop3d { display: none; }
  body:not(.is-desktop-input) .welcome-touch3d { display: flex; }
}
@media (max-width: 640px) and (orientation: portrait) {
  :root { --safe-left3d: max(12px, env(safe-area-inset-left)); --safe-right3d: max(12px, env(safe-area-inset-right)); }
  .brand3d { display: none; }
  .system3d { gap: 6px; }
  .health3d { left: var(--safe-left3d); top: calc(var(--safe-top3d) + 51px); }
  .desktop-hint3d { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  :root { --safe-top3d: max(9px, env(safe-area-inset-top)); --safe-bottom3d: max(9px, env(safe-area-inset-bottom)); }
  .brand3d { display: none; }
  .timer3d { min-width: 76px; padding: 7px 10px; }
  .timer3d strong { font-size: 26px; }
  .action3d { width: 60px; height: 60px; }
  .boost3d { width: 68px; height: 68px; right: calc(var(--safe-right3d) + 70px); }
  .land3d { bottom: calc(var(--safe-bottom3d) + 62px); }
  .home3d { width: 52px; height: 52px; }
  .card3d { width: min(530px, 100%); padding: 21px 26px; }
  .card3d h1, .card3d h2 { font-size: 30px; margin: 5px 0 10px; }
  .card3d .intro3d { grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 16px 0; font-size: 13px; }
  .card3d .dedication3d { margin: 10px 0; }
  .settings-dialog3d { width: min(430px, calc(100vw - 24px)); padding: 12px 18px; max-height: calc(100dvh - 18px); }
  .settings-dialog3d h2 { font-size: 22px; margin-bottom: 6px; }
  .welcome-card3d .control-legend3d { margin: 13px 0 8px; }
  .welcome-card3d > .eyebrow3d { margin-bottom: 12px; }
  .welcome-card3d > .desktop-hint3d { margin-top: 12px; }
  .card3d.brief-card3d { width: min(460px, 100%); padding: 12px 18px; border-radius: 18px; }
  .card3d.brief-card3d h2 { margin: 0 0 6px; font-size: 23px; }
  #brief-time3d { margin: 5px 0; font-size: 12px; }
}
@media (max-width: 640px) and (max-height: 500px) and (orientation: landscape) {
  .system3d { gap: 5px; }
  .health3d { width: 88px; gap: 4px; padding-inline: 6px; }
}
@media (min-height: 501px) and (min-width: 641px) {
  body.is-desktop-input .cargo3d { top: calc(var(--safe-top3d) + 54px); }
  body.is-desktop-input .health3d { top: calc(var(--safe-top3d) + 62px); }
  body.is-desktop-input .recipe-hud3d { left: calc(var(--safe-left3d) + 220px); max-width: calc(100vw - var(--safe-left3d) - var(--safe-right3d) - 220px); }
}
@media (min-height: 501px) and (min-width: 641px) and (max-width: 751px) {
  body.is-desktop-input .recipe-hud3d { width: calc(var(--recipe-mobile-columns, 2) * 120px + (var(--recipe-mobile-columns, 2) - 1) * 4px); }
  body.is-desktop-input .recipe3d { grid-template-columns: repeat(var(--recipe-mobile-columns, 2), minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  body.alibee-3d *, body.alibee-3d *::before, body.alibee-3d *::after { transition: none !important; }
}
/* Defeat is seen in the world first. The retry card leaves the scene uncovered. */
.loading3d { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; color: #254b39; background: #eff2e4; }
.loading3d section { width: min(430px, 100%); text-align: center; }
.loading3d svg { display: block; width: 86px; height: 86px; margin: 0 auto 23px; }
.loading3d .eyebrow3d { display: block; font-size: 11px; letter-spacing: .15em; }
.loading3d h2 { margin: 10px 0 14px; font-size: clamp(25px, 4vw, 36px); font-weight: 650; letter-spacing: -.04em; }
.loading3d p { margin: 0; color: #526b52; font-size: 14px; line-height: 1.5; }
.loading3d small { display: block; margin-top: 14px; color: #65755c; font-size: 12px; }
.loading-line3d { display: block; width: 100px; height: 3px; margin: 24px auto 0; overflow: hidden; background: #d0dcc0; border-radius: 3px; }
.loading-line3d::after { content: ''; display: block; width: 45%; height: 100%; background: #668350; border-radius: inherit; animation: preparing3d 1.3s ease-in-out infinite alternate; }
.loading3d.is-reduced .loading-line3d::after { animation: none; width: 100%; }
@keyframes preparing3d { to { transform: translateX(125%); } }
.preparation3d { display: block; margin: 12px 0; color: #49634e; font-size: 12px; line-height: 1.45; }
.result-medal3d { display: grid; gap: 8px; margin: 16px 0; }
#result-stars3d { color: #b77d21; font-size: 32px; line-height: 1; letter-spacing: .14em; }
#result-detail3d { color: #506a51; font-size: 12px; }
.reserve3d strong { color: #916822; }
.loading3d[hidden], .preparation3d[hidden], .result-medal3d[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .loading-line3d::after { animation: none; width: 100%; } }
#result-overlay3d.is-defeat { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; align-items: end; padding-bottom: calc(var(--safe-bottom3d) + 18px); }
#result-overlay3d.is-defeat .card3d { width: min(330px, calc(100vw - 28px)); padding: 17px 20px; border: 1px solid #fefdee; box-shadow: 0 7px 24px #193d302b; pointer-events: auto; }
#result-overlay3d.is-defeat h2 { margin: 6px 0; font-size: 23px; line-height: 1.15; }
#result-overlay3d.is-defeat p { margin: 7px 0; font-size: 12px; line-height: 1.35; }
#result-overlay3d.is-defeat .secondary3d { --comb-fill3d: #214e3d; min-height: 44px; margin-top: 8px; color: #fffbea; background: #214e3d; border: 0; font-size: 13px; }
@media (max-height: 500px) and (orientation: landscape) {
  #result-overlay3d.is-defeat .card3d { width: min(380px, calc(100vw - 28px)); padding: 12px 17px; }
  #result-overlay3d.is-defeat h2 { font-size: 21px; }
  #result-overlay3d.is-defeat p { margin: 5px 0; }
}
@media (orientation: landscape) and (max-height: 360px) {
  .card3d.brief-card3d { padding: 12px 18px; }
  .card3d.brief-card3d h2 { font-size: 22px; line-height: 1.1; }
}
/* The harvest finishes in the meadow. This is a small shelf, without a screen veil. */
#result-overlay3d.is-victory { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; place-items: end start; padding: var(--safe-bottom3d) var(--safe-left3d); overflow: hidden; }
#result-overlay3d.is-victory .result-card3d { width: min(380px, 100%); max-height: 44dvh; padding: 16px 18px; border-radius: 19px; border: 1px solid #fffdf1; background: #f6f6ebf5; box-shadow: 0 6px 24px #173c302b; pointer-events: auto; animation: harvest-arrival3d .24s ease-out; }
#result-overlay3d.is-victory .eyebrow3d { color: #526c48; font-size: 10px; letter-spacing: .11em; }
#result-overlay3d.is-victory h2 { margin: 5px 0; font-size: 25px; line-height: 1.08; }
#result-overlay3d.is-victory p { margin: 5px 0; font-size: 13px; line-height: 1.3; }
#result-overlay3d.is-victory .result-medal3d { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 11px; margin: 8px 0; }
#result-overlay3d.is-victory .result-medal3d[hidden] { display: none; }
#result-overlay3d.is-victory #result-stars3d { font-size: 23px; letter-spacing: .08em; }
#result-overlay3d.is-victory #result-detail3d { font-size: 11px; }
.result-actions3d { display: flex; gap: 7px; }
#result-overlay3d.is-victory .result-actions3d > button { flex: 1; width: auto; min-height: 44px; padding: 10px 9px; margin: 5px 0 0; border-radius: 11px; font-size: 12px; white-space: nowrap; }
#result-overlay3d.is-victory .result-actions3d > button[hidden] { display: none; }
.is-victory3d .field-status3d, .is-victory3d .timer3d { visibility: hidden; }
@keyframes harvest-arrival3d { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (orientation: landscape) and (max-height: 500px) {
  #result-overlay3d.is-victory .result-card3d { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; width: min(490px, 100%); max-height: 42dvh; padding: 12px 15px; border-radius: 15px; }
  #result-overlay3d.is-victory .result-card3d > .eyebrow3d, #result-overlay3d.is-victory .result-card3d > h2, #result-overlay3d.is-victory .result-card3d > p, #result-overlay3d.is-victory .result-card3d > .result-medal3d { grid-column: 1; }
  #result-overlay3d.is-victory h2 { font-size: 23px; }
  #result-overlay3d.is-victory .result-medal3d { margin: 4px 0 0; }
  #result-overlay3d.is-victory .result-actions3d { grid-column: 2; grid-row: 1 / 5; flex-direction: column; justify-content: center; gap: 5px; }
  #result-overlay3d.is-victory .result-actions3d > button { flex: none; margin: 0; padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) { #result-overlay3d.is-victory .result-card3d { animation: none; } }

/* Quality stars belong in the result; healing honey stays in the meadow. */
#result-overlay3d.is-victory #result-stars3d { display: inline-flex; gap: 3px; align-items: center; }
.quality-star3d { width: 22px; height: 23px; fill: #f0ecdc; stroke: #9f956f; stroke-width: 1.35; stroke-linejoin: round; }
.quality-star3d.is-earned { fill: #dba33e; stroke: #8d6223; }
#result-reward-copy3d { width: 100%; color: #486149; font-size: 11px; line-height: 1.35; }
/* Game surface v0.31: gestures belong to flight here, never to reading panels. */
body.alibee-3d :where(#world3d, .hud3d, .hud3d *, .field-status3d, .field-status3d *, .cargo3d, .cargo3d *, .touch3d, .touch3d *) {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
body.alibee-3d :where(.overlay3d, .card3d, .brief-copy3d, .settings-dialog3d, .mieli-field-guide, .mieli-profile) {
  touch-action: pan-y pinch-zoom;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
body.alibee-3d :is(input, textarea, select, option, [contenteditable="true"]) {
  touch-action: manipulation;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
body.alibee-3d :where(.overlay3d, .card3d, .settings-dialog3d, .mieli-field-guide, .mieli-profile) :is(button, a, summary) {
  touch-action: manipulation;
}

/* v0.32: a native top-layer reading card pauses a portrait phone, including nested menus. */
.orientation-dialog3d:not([open]) { display: none; }
.orientation-dialog3d[open] {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  color: #214b38;
  background: #edf1e3;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
.orientation-dialog3d::backdrop { background: #edf1e3; }
.orientation-dialog3d:focus { outline: none; }
.orientation-card3d { width: min(100%, 330px); margin: auto; text-align: center; }
.orientation-icon3d { display: block; width: 96px; height: 96px; margin: 0 auto 24px; color: #52754e; }
.orientation-card3d h2 { margin: 0 0 13px; color: #214b38; font-size: clamp(28px, 7vw, 34px); font-weight: 650; line-height: 1.1; letter-spacing: -.04em; }
.orientation-card3d p { margin: 0 0 16px; color: #3e5d46; font-size: 17px; line-height: 1.45; }
.orientation-card3d small { display: block; max-width: 270px; margin: 0 auto; color: #5a6d53; font-size: 13px; line-height: 1.5; }
@media (max-height: 420px) { .orientation-icon3d { width: 68px; height: 68px; margin-bottom: 14px; } }

/* Honeycomb console: only decorative surfaces are masked. Hit areas, keycaps,
   cooldown badges, focus rings and reading scroll containers remain unclipped. */
body.alibee-3d :where(.action3d, .system3d button, .icon3d,
  .card3d button, .card3d a.secondary3d, .settings-dialog3d button,
  .mieli-field-guide button:not(.mieli-field-guide-entry, .mieli-field-guide-back), .mieli-profile button, .mieli-profile-auth-button) {
  --comb-shape3d: var(--comb-cap3d); --comb-edge3d: var(--comb-cap-edge3d); --comb-fill3d: #f6f7ed;
  isolation: isolate; border-radius: 11px;
  /* State surfaces now belong to ::before; existing text/pressed semantics stay. */
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
}
body.alibee-3d :where(.system3d button, .icon3d, .card3d button, .card3d a.secondary3d, .settings-dialog3d button,
  .mieli-field-guide button:not(.mieli-field-guide-entry, .mieli-field-guide-back), .mieli-profile button, .mieli-profile-auth-button):not(.dialog-close3d, .mieli-field-guide-close, .mieli-profile-close) { position: relative; }
body.alibee-3d :is(.action3d, .system3d button, .icon3d,
  .dialog-close3d, .mieli-field-guide-close, .mieli-profile-close) {
  --comb-shape3d: var(--comb-hex3d); --comb-edge3d: var(--comb-hex-edge3d);
}
body.alibee-3d :is(.action3d, .system3d button, .icon3d,
  .card3d button, .card3d a.secondary3d, .settings-dialog3d button,
  .mieli-field-guide button:not(.mieli-field-guide-entry, .mieli-field-guide-back), .mieli-profile button, .mieli-profile-auth-button)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--comb-edge3d) center / 100% 100% no-repeat, var(--comb-fill3d);
  -webkit-mask: var(--comb-shape3d) center / 100% 100% no-repeat;
  mask: var(--comb-shape3d) center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px #173e3229);
  transition: background-color .12s, filter .12s;
}
body.alibee-3d :is(.boost3d, .card3d .primary3d, .settings-dialog3d .primary3d,
  .system3d button[aria-pressed="true"], .icon3d[aria-pressed="true"], .home3d.is-returning) { --comb-fill3d: #194d3b; color: #fff9e8; }
body.alibee-3d .boost3d.is-cooling { --comb-fill3d: #315c46; }
body.alibee-3d :is(.land3d.is-selected, .land3d.is-landed) { --comb-fill3d: #f6dda0; }
body.alibee-3d .land3d.is-landing { --comb-fill3d: #dce9c8; }
body.alibee-3d .boost3d.is-boosting { --comb-fill3d: #f3cf70; color: #173d2f; }
body.alibee-3d :is(.action3d, .system3d button, .icon3d):focus-visible { outline: 3px solid #1d503d; outline-offset: 3px; }
body.alibee-3d :is(.action3d, .system3d button, .icon3d):is(:focus-visible, .is-held)::before { filter: drop-shadow(0 0 3px #e5bf69) drop-shadow(0 2px 3px #173e3259); }
body.alibee-3d :is(.boost3d.is-cooling, .boost3d.is-tired)::after { border-radius: 7px 3px; }
.action3d kbd { border-radius: 5px 2px; border-color: #b08b46; background: #fff8e7; }

.timer3d, .cargo3d { isolation: isolate; background: transparent; border-color: transparent; border-radius: 9px; box-shadow: none; }
.cargo3d { --comb-fill3d: #f7f8edf5; }
.timer3d { --comb-fill3d: #173f33; }
.timer3d::before, .cargo3d::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; pointer-events: none;
  background: var(--comb-edge3d) center / 100% 100% no-repeat, var(--comb-fill3d);
  -webkit-mask: var(--comb-shape3d) center / 100% 100% no-repeat;
  mask: var(--comb-shape3d) center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 3px #173e3233);
}
.timer3d { --comb-shape3d: var(--comb-cap3d); --comb-edge3d: var(--comb-cap-edge3d); }
.cargo3d { --comb-shape3d: var(--comb-cap3d); --comb-edge3d: var(--comb-cap-edge3d); }
.timer3d.is-urgent { --comb-fill3d: #873d29; background: transparent; }
.cargo3d.is-full { --comb-fill3d: #f5df9d; background: transparent; border-color: transparent; box-shadow: none; }
.brand3d { border-color: #cfb57a; border-radius: 13px 5px; background: #f8f9eef5; }
.health3d { border-radius: 9px 3px; }
.explore-next3d { pointer-events: auto; position: absolute; left: 50%; bottom: calc(var(--safe-bottom3d) + 54px); transform: translateX(-50%); isolation: isolate; width: 188px; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px 4px; background: transparent; color: #fff9e8; font: inherit; font-size: 13px; font-weight: 650; line-height: 1.2; box-shadow: none; }
.field-status3d:has(#explore-next3d:not([hidden])) .context3d { bottom: calc(var(--safe-bottom3d) + 106px); }
.explore-next3d::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--comb-cap-edge3d) center / 100% 100% no-repeat, #194d3b; -webkit-mask: var(--comb-cap3d) center / 100% 100% no-repeat; mask: var(--comb-cap3d) center / 100% 100% no-repeat; }
.explore-next3d:focus-visible { outline: 3px solid #e9bf65; outline-offset: 3px; }
.explore-next3d:disabled { opacity: .6; }
#health-change3d, .recipe-chip3d { border-radius: 5px 2px; box-shadow: inset 0 0 0 1px #b9b98f55; }
#cargo-pips3d > i { border-radius: 2px 0; }

/* Reading cards keep their native scrolling/background and generous inner space. */
body.alibee-3d :is(.card3d, .settings-dialog3d, dialog.mieli-field-guide, dialog.mieli-profile) {
  border-color: #cfb57a; border-radius: 20px 8px;
  box-shadow: inset 0 1px 0 #fffdf3, 0 12px 36px #183b2d26;
}
body.alibee-3d :is(.card3d select, .settings-dialog3d select) { border-color: #c4ad75; border-radius: 12px 4px; }
body.alibee-3d #result-overlay3d:is(.is-victory, .is-defeat) .card3d { border-color: #cfb57a; border-radius: 18px 6px; }
body.alibee-3d :is(.mieli-profile-rank, .mieli-profile-total, .mieli-profile-identity) { border-radius: 14px 5px; border-color: #d7c89d; }
body.alibee-3d .mieli-field-guide-entry { border-radius: 13px 4px; border-color: #cbb981; }
.orientation-icon3d { padding: 9px; border: 1px solid #c9b176; border-radius: 18px 6px; background: #f8f7e9; }
@media (hover: hover) and (pointer: fine) {
  body.alibee-3d :is(.action3d, .system3d button, .icon3d):not(:disabled):hover::before { filter: drop-shadow(0 0 2px #f3d991) drop-shadow(0 3px 4px #173e3266); }
  body.alibee-3d .boost3d:not(.is-boosting):not(.is-cooling):hover { --comb-fill3d: #286047; }
}
@media (prefers-reduced-motion: reduce) {
  body.alibee-3d button::before, body.alibee-3d a.secondary3d::before { transition: none; }
}

/* The first flight teaches real gestures without taking control of the game. */
.tutorial-card3d { position: absolute; z-index: 5; left: 50%; bottom: calc(var(--safe-bottom3d) + 54px); transform: translateX(-50%); width: min(340px, calc(100vw - 324px)); min-width: 244px; padding: 10px 13px 11px; border: 1px solid #bb9450; border-radius: 15px 5px; background: #fff8e8f7; color: #244735; box-shadow: inset 0 1px 0 #fffdf4, 0 4px 14px #173e3230; pointer-events: none; }
.tutorial-step3d { display: block; margin-bottom: 4px; color: #7c5a27; font-size: 10px; font-weight: 750; letter-spacing: .07em; line-height: 1.2; }
.tutorial-card3d strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.2; }
.tutorial-card3d p { margin: 6px 0 0; font-size: 13px; line-height: 1.35; }
.tutorial-pointer3d { display: none; position: absolute; right: 100%; bottom: 22px; width: clamp(42px, calc((100vw - 340px) / 2 - 124px), 180px); height: 42px; overflow: visible; color: #fff4c9; filter: drop-shadow(0 1px 1px #234d35); }
.tutorial-card3d[data-gesture="move"] .tutorial-pointer3d { display: block; }
.tutorial-zone3d { position: absolute; z-index: 5; left: calc(var(--safe-left3d) + 22px); bottom: calc(var(--safe-bottom3d) + 26px); width: 112px; height: 110px; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; }
.tutorial-stick3d { display: grid; place-items: center; flex: none; width: 84px; height: 84px; border: 2px solid #fff4cc; border-radius: 50%; color: #fff8da; background: #224e393d; box-shadow: 0 0 0 1px #315b3a, inset 0 0 0 1px #315b3a; }
.tutorial-stick3d svg { width: 40px; height: 40px; filter: drop-shadow(0 1px 1px #173d2b); }
.tutorial-zone-label3d { padding: 3px 7px; border-radius: 5px; background: #244f3b; color: #fff9df; font-size: 12px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
body:has(#joystick3d.is-active) .tutorial-zone3d { visibility: hidden; }
.tutorial-card3d[hidden], .tutorial-zone3d[hidden] { display: none; }
@media (max-width: 740px) { .tutorial-card3d strong { font-size: 15px; } .tutorial-card3d p { font-size: 12.5px; } }

/* One local type family and one icon grammar. Existing console dimensions,
   true button hit areas and controller-owned labels/states remain intact. */
body.alibee-3d :is(.mieli-field-guide, .mieli-profile, .mieli-profile-auth-button, .mieli-field-guide-badge) { font-family: var(--ui-font3d); font-weight: 600; }
body.alibee-3d :is(.mieli-field-guide-title, .mieli-field-guide-name, .mieli-profile-title, .mieli-profile-rank-title, .mieli-profile-identity-title) { font-family: var(--ui-font3d); font-weight: 700; letter-spacing: -.025em; }
.card3d h1, .card3d h2, .settings-dialog3d h2 { font-weight: 800; letter-spacing: -.035em; }
.brand3d strong { font-weight: 800; letter-spacing: -.04em; }
.timer3d strong, #cargo-count3d, #delivery3d { font-weight: 800; letter-spacing: -.02em; }
.card3d button, .card3d .secondary3d, .settings-dialog3d button:not(.dialog-close3d), .action3d small, .action3d kbd { font-weight: 700; }
.card3d p, .settings-dialog3d p, .brief-copy3d p, .tutorial-card3d p { font-weight: 600; }
.tutorial-card3d strong, .recipe-chip3d > b, .health3d > strong { font-weight: 700; }
.cargo-head3d > .eyebrow3d { font-size: 10px; font-weight: 700; letter-spacing: .035em; }
#objective-label3d { font-size: 11px; }
.welcome-card3d > .eyebrow3d, .settings-dialog3d .eyebrow3d { font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.action3d > span[aria-hidden="true"] { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.action3d svg, .system3d svg { stroke-width: 1.8; }
.home3d svg { width: 22px; height: 22px; }
.home3d small { font-size: 10.5px; }
.ui-takeoff3d { display: none; }
.land3d.is-landed .ui-land3d { display: none; }
.land3d.is-landed .ui-takeoff3d { display: inline; }

/* sync() still owns the pause/audio text and accessible name. CSS masks keep
   their original SVG artwork stable when the controller replaces textContent. */
#pause3d, body.alibee-3d .settings-dialog3d #sound3d, body.alibee-3d .dialog-close3d { font-size: 0; line-height: 0; }
#pause3d::after, #sound3d::after, .dialog-close3d::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  pointer-events: none; background: currentColor;
  -webkit-mask: var(--ui-icon3d) center / contain no-repeat;
  mask: var(--ui-icon3d) center / contain no-repeat;
}
#pause3d { --ui-icon3d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%226.5%22%20y%3D%225%22%20width%3D%223.5%22%20height%3D%2214%22%20rx%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%225%22%20width%3D%223.5%22%20height%3D%2214%22%20rx%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E"); }
#pause3d[aria-pressed="true"] { --ui-icon3d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m8%205%2011%207-11%207Z%22%20fill%3D%22%23000%22%20stroke-width%3D%221.4%22%2F%3E%3C%2Fsvg%3E"); }
.dialog-close3d { --ui-icon3d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7%207%2010%2010M17%207%207%2017%22%2F%3E%3C%2Fsvg%3E"); }
#sound3d { --ui-icon3d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%209h4l6-4v14l-6-4H3Z%22%2F%3E%3Cpath%20d%3D%22m17%209%205%206m0-6-5%206%22%2F%3E%3C%2Fsvg%3E"); }
#sound3d[aria-pressed="true"] { --ui-icon3d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%209h4l6-4v14l-6-4H3ZM16%209q2.5%203%200%206M19%206q5%206%200%2012%22%2F%3E%3C%2Fsvg%3E"); }

/* Static botanical signatures: small in flight, larger only in the notebook. */
.nature-icon3d { display: block; width: 100%; height: 100%; }
.flower-icon3d, .tutorial-flower-icon3d { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 16px; height: 16px; }
.context3d { width: max-content; max-width: min(244px, calc(100vw - var(--safe-left3d) - var(--safe-right3d))); min-height: 0; padding: 2px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.context3d:has(#nearby3d[hidden]):has(#notice3d[hidden]) { display: none; }
.context3d:has(#notice3d[hidden]) .nearby3d:not([hidden]) { display: flex; }
.context3d .nearby3d { align-items: center; gap: 5px; }
.context3d .nearby3d strong { max-width: 150px; overflow: visible; text-overflow: clip; white-space: normal; font-size: 12px; font-weight: 700; line-height: 1.2; }
.context3d .nearby3d small { margin-left: 0; font-size: 12px; font-weight: 600; }
.context3d .notice3d { max-width: 230px; overflow: visible; text-overflow: clip; white-space: normal; font-size: 12px; font-weight: 700; line-height: 1.25; }
.tutorial-card3d:not(.is-compact) > .tutorial-flower-icon3d { display: none; }
.tutorial-card3d.is-compact { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; column-gap: 5px; row-gap: 2px; width: 244px; min-width: 0; max-width: calc(100vw - var(--safe-left3d) - var(--safe-right3d)); padding: 3px 6px; border-color: #b9c5a1; border-radius: 9px 3px; background: #eff3e5f0; box-shadow: 0 1px 5px #173e3220; pointer-events: none; }
.tutorial-card3d.is-compact .tutorial-flower-icon3d { grid-column: 1; grid-row: 1; width: 14px; height: 14px; }
.tutorial-card3d.is-compact strong { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; font-size: 12px; line-height: 1.1; }
.tutorial-card3d.is-compact .tutorial-step3d { grid-column: 3; grid-row: 1; align-self: center; margin: 0; font-size: 10px; letter-spacing: 0; line-height: 1.1; }
.tutorial-card3d.is-compact p { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 12px; line-height: 1.18; }
.tutorial-card3d.is-compact .tutorial-pointer3d { display: none; }
@media (max-width: 499px) {
  .tutorial-card3d.is-compact { bottom: calc(var(--safe-bottom3d) + 84px); }
}
.recipe-chip3d { gap: 4px; min-height: 24px; padding: 3px 5px; box-shadow: none; background: #f7f7ebeb; }
.recipe-chip3d > .recipe-name3d { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: visible; text-overflow: clip; white-space: nowrap; }
.recipe-icon3d { display: inline-flex; flex: none; width: 14px; height: 14px; }
.recipe-label3d { font-size: 11.5px; line-height: 1.1; }
.recipe-chip3d > b { font-size: 12.5px; line-height: 1.2; }
#flower-icon3d[hidden], #tutorial-flower-icon3d[hidden], .recipe-icon3d[hidden], .tutorial-card3d[hidden] { display: none; }
body.alibee-3d .nature-symbol3d { display: inline-flex; flex: none; width: 24px; height: 24px; }
body.alibee-3d .mieli-field-guide-entry:has(.nature-symbol3d) .mieli-field-guide-entry-copy { flex: 1; }
body.alibee-3d .mieli-field-guide-name:has(.nature-symbol3d) { display: flex; align-items: center; gap: 8px; }
body.alibee-3d .mieli-field-guide-name > .nature-symbol3d { order: -1; }
body.alibee-3d .nature-legend3d > summary { min-height: 44px; padding-block: 12px; }
body.alibee-3d .nature-legend-list3d { display: grid; gap: 13px; margin: 7px 0 0; padding: 0; list-style: none; }
body.alibee-3d .nature-legend-row3d { display: flex; align-items: flex-start; gap: 10px; }
body.alibee-3d .nature-legend-icons3d { display: flex; flex: 0 0 80px; flex-wrap: wrap; gap: 3px; }
body.alibee-3d .nature-legend-copy3d { min-width: 0; }
body.alibee-3d .nature-legend-copy3d strong { font-size: 13px; font-weight: 700; }
body.alibee-3d .nature-legend-copy3d p { margin: 3px 0 0; font-size: 12px; line-height: 1.4; }
body.alibee-3d .nature-legend-icons3d:has(> :nth-child(4)) { display: grid; grid-template-columns: 24px 24px; }
body.alibee-3d .nature-card-illustration3d { width: 100%; aspect-ratio: 120 / 128; }
body.alibee-3d .nature-card-illustration3d > svg { display: block; width: 100%; height: 100%; }
body.alibee-3d .nature-card-illustration3d svg * { vector-effect: non-scaling-stroke; }

/* The full welcome stays readable above the field on short landscape screens.
   Keep native scrolling as a fallback; never clip instructions or shrink taps. */
@media (orientation: landscape) and (max-height: 420px) {
  .card3d.welcome-card3d { padding: 10px 22px; }
  .welcome-card3d > .eyebrow3d { margin: 0 auto 3px; font-size: 12px; line-height: 1.15; }
  .card3d.welcome-card3d h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.06; }
  .card3d.welcome-card3d p { margin: 0 0 6px; font-size: 13px; line-height: 1.2; }
  .card3d.welcome-card3d #start3d { min-height: 44px; margin-top: 0; padding: 8px 14px; font-size: 14px; line-height: 1.2; }
  .welcome-card3d .control-legend3d { gap: 16px; margin: 6px 0 4px; font-size: 12px; line-height: 1.2; }
  .welcome-card3d .control-legend3d > span { gap: 1px; }
  .welcome-card3d .control-legend3d b { font-size: 12px; }
  .welcome-card3d > .desktop-hint3d { margin-top: 0; font-size: 12px; line-height: 1.25; }
  .card3d.welcome-card3d > .dedication3d { margin: 5px 0 0; font-size: 12px; line-height: 1.1; }
  .welcome-card3d > .preparation3d { margin-top: 5px; font-size: 12px; line-height: 1.2; }
}
body.alibee-3d :is(.action3d, .system3d button, .icon3d):is(:focus-visible, .is-held)::before { filter: drop-shadow(0 2px 3px #173e3259); }
@media (hover: hover) and (pointer: fine) {
  body.alibee-3d :is(.action3d, .system3d button, .icon3d):not(:disabled):hover::before { filter: drop-shadow(0 3px 3px #173e3247); }
}

/* One glance for the harvest, one quiet rail above the resting thumb.
   Only artwork is inset on the system buttons; their real targets stay intact. */
.mission-hud3d {
  position: absolute; top: var(--safe-top3d); left: var(--safe-left3d);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  --mission-data-gap3d: 4px;
  grid-template-rows: calc(20px + var(--mission-data-gap3d)) 27px auto; gap: 2px 6px;
  width: 132px; padding: 4px 6px; isolation: isolate;
  border: 1px solid #879778; border-radius: 13px 5px;
  color: #183d32; background: #fff8e8;
  box-shadow: inset 0 -1px 0 #eadbb5, 0 3px 9px #153c2e29;
  pointer-events: none;
}
.mission-hud3d::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 27px;
  border-radius: 12px 4px 0 0; background: #234e3d;
}
#mission-hud3d :is(.timer3d, .cargo3d, .objective-dock3d, .health3d, .recipe-hud3d) {
  position: relative; inset: auto; transform: none; width: auto; max-width: none;
  min-width: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none;
  background: transparent;
}
#mission-hud3d :is(.timer3d, .cargo3d)::before { display: none; }
#mission-hud3d .timer3d {
  grid-column: 1; grid-row: 1; display: flex; align-items: center; align-self: start;
  justify-content: flex-start; gap: 4px; height: 20px; padding: 0;
  color: #fff8e7; text-align: left;
}
#mission-hud3d .clock-icon3d { flex: none; width: 12px; height: 12px; color: #edcf8c; }
#mission-hud3d .timer3d > div { gap: 2px; }
#mission-hud3d .timer3d strong { font-size: 18px; line-height: 1; font-weight: 850; letter-spacing: -.025em; }
#mission-hud3d #seconds-unit3d { color: #e2ebd5; font-size: 10px; font-weight: 650; }
#mission-hud3d:has(.health3d[hidden]) .timer3d { grid-column: 1 / -1; justify-content: center; }
.mission-hud3d:has(.timer3d.is-urgent)::before { background: #873d29; }
#mission-hud3d .timer3d.is-urgent .clock-icon3d { color: #fff0b5; }

#mission-hud3d .cargo3d {
  grid-column: 1; grid-row: 2; display: grid;
  grid-template-columns: 12px minmax(0, 1fr); grid-template-rows: 9px 14px 2px;
  gap: 1px 3px; height: 27px; padding: 0; color: #73531e;
}
#mission-hud3d .cargo-head3d { display: contents; }
#mission-hud3d .cargo-head3d > .eyebrow3d {
  grid-column: 1 / -1; grid-row: 1; color: #68552c;
  font-size: 9px; line-height: 1; font-weight: 750; letter-spacing: 0;
}
#mission-hud3d .cargo-icon3d { grid-column: 1; grid-row: 2; width: 12px; height: 14px; }
#mission-hud3d #cargo-count3d { grid-column: 2; grid-row: 2; color: #543f18; font-size: 14px; line-height: 1; font-weight: 850; letter-spacing: -.035em; }
#mission-hud3d #cargo-pips3d { grid-column: 1 / -1; grid-row: 3; gap: 1px; height: 2px; }
#mission-hud3d #cargo-pips3d > i { height: 2px; border: 0; background: #e6d7b1; border-radius: 1px; }
#mission-hud3d #cargo-pips3d > .filled { background: #b77e24; }
#mission-hud3d .cargo3d.is-full #cargo-count3d { color: #8a4c0c; }
#mission-hud3d .cargo3d.is-full #cargo-pips3d > .filled { background: #b3670d; }
#mission-hud3d .cargo-vitals3d { position: absolute; left: 0; right: 0; bottom: -3px; width: auto; }

#mission-hud3d .objective-dock3d { grid-column: 2; grid-row: 2; display: block; height: 27px; }
#mission-hud3d .objective3d {
  display: grid; grid-template-columns: 12px minmax(0, 1fr); grid-template-rows: 9px 14px 2px;
  gap: 1px 3px; width: 100%; height: 27px; padding: 0; border: 0;
  border-radius: 0; background: transparent; box-shadow: none;
}
#mission-hud3d .objective3d > svg { grid-column: 1; grid-row: 2; width: 12px; height: 14px; color: #477043; }
#mission-hud3d #objective-label3d { grid-column: 1 / -1; grid-row: 1; color: #466146; font-size: 9px; font-weight: 750; line-height: 1; }
#mission-hud3d #delivery3d { grid-column: 2; grid-row: 2; color: #244d35; font-size: 14px; line-height: 1; font-weight: 850; letter-spacing: -.035em; }
#mission-hud3d #objective-meter3d { grid-column: 1 / -1; grid-row: 3; height: 2px; background: #d9e2cb; }

#mission-hud3d .health3d {
  grid-column: 2; grid-row: 1; display: grid; align-items: center; align-self: start;
  grid-template-columns: 9px minmax(0, 1fr) 22px; gap: 3px;
  height: 20px; min-height: 0; padding: 0; color: #e8c578;
}
#mission-hud3d .health3d > svg { width: 9px; height: 10px; }
#mission-hud3d .health3d > strong { min-width: 0; color: #fff8e8; font-size: 13px; line-height: 1; font-weight: 800; }
#mission-hud3d .health-track3d { min-width: 0; height: 3px; background: #65866b; }
#mission-hud3d .health3d progress::-webkit-progress-value { background: #d3e5bd; }
#mission-hud3d .health3d progress::-moz-progress-bar { background: #d3e5bd; }
#mission-hud3d .health3d.is-low { color: #ffb692; }
#mission-hud3d .health3d.is-low progress::-webkit-progress-value { background: #ffc09b; }
#mission-hud3d .health3d.is-low progress::-moz-progress-bar { background: #ffc09b; }
#mission-hud3d #health-change3d { top: -2px; left: calc(100% + 12px); min-width: 30px; padding: 4px; font-size: 12px; }

#mission-hud3d .recipe-hud3d {
  grid-column: 1 / -1; grid-row: 3; padding-top: 3px; border-top: 1px solid #d4d7b9;
}
#mission-hud3d .recipe-heading3d { display: block; margin: 0 0 1px; color: #63704e; font-size: 9px; line-height: 9px; font-weight: 750; letter-spacing: .005em; }
#mission-hud3d .recipe3d { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
#mission-hud3d .recipe-chip3d {
  gap: 3px; height: 17px; min-height: 17px; padding: 0; border: 0;
  border-radius: 3px; background: transparent; color: #264d38; box-shadow: none;
}
#mission-hud3d .recipe-chip3d > .recipe-name3d { gap: 3px; overflow: visible; white-space: nowrap; }
#mission-hud3d .recipe-icon3d { width: 13px; height: 13px; }
#mission-hud3d .recipe-label3d { font-size: 11.5px; line-height: 1.1; font-weight: 700; }
#mission-hud3d .recipe-chip3d > b { min-width: 22px; color: #244d35; font-size: 12.5px; line-height: 1; text-align: right; font-weight: 850; }
#mission-hud3d .recipe-chip3d.is-complete { background: #e4ecd4; }
#mission-hud3d .recipe-chip3d.is-complete > b { color: #356a3f; }
#mission-hud3d :is(.recipe-hud3d[hidden], .recipe3d[hidden], .health3d[hidden]) { display: none; }
.mission-hud3d:not(:has(.recipe-hud3d:not([hidden]))) { grid-template-rows: calc(20px + var(--mission-data-gap3d)) 27px; }

/* Compact system artwork stays inside the same rectangular touch targets. */
body.alibee-3d .system3d { gap: 5px; }
body.alibee-3d .system3d :is(#pause3d, #settings3d)::before { inset: auto; left: 50%; top: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%); }
body.alibee-3d .system3d svg, #pause3d::after { width: 18px; height: 18px; }
body.alibee-3d .land3d { --comb-shape3d: var(--comb-cap3d); --comb-edge3d: var(--comb-cap-edge3d); --comb-fill3d: #f4dfa4; color: #3e491f; }
body.alibee-3d .land3d small { font-size: 13px; font-weight: 850; }
body.alibee-3d .land3d.is-landing { --comb-fill3d: #dce9c8; }
body.alibee-3d .land3d.is-landed { --comb-fill3d: #edcb78; }

/* A real paper label stays legible against every meadow. */
body.alibee-3d .field-status3d .context3d {
  left: calc(50% - 8px); bottom: var(--safe-bottom3d); width: max-content;
  max-width: min(200px, calc(100vw - 292px)); min-height: 30px;
  padding: 6px 10px; border: 1px solid #ae955b; border-radius: 10px 4px;
  color: #183d32; background: #fff8e8; box-shadow: 0 2px 7px #163c2b30;
}
body.alibee-3d .context3d .nearby3d { gap: 6px; }
body.alibee-3d .context3d .flower-icon3d { width: 18px; height: 18px; }
body.alibee-3d .context3d .nearby3d strong { max-width: none; color: #183d32; font-size: 13px; line-height: 16px; font-weight: 800; white-space: nowrap; }
body.alibee-3d .context3d .notice3d { max-width: none; color: #654518; font-size: 12px; line-height: 1.25; }
body.alibee-3d .field-status3d:has(#explore-next3d:not([hidden])) .context3d { bottom: calc(var(--safe-bottom3d) + 52px); }
body.alibee-3d .explore-next3d { left: calc(50% - 8px); bottom: var(--safe-bottom3d); width: 164px; }

@media (min-height: 501px) and (min-width: 641px) {
  .mission-hud3d { width: 148px; grid-template-rows: calc(22px + var(--mission-data-gap3d)) 29px auto; gap: 3px 8px; padding: 5px 7px; }
  .mission-hud3d::before { height: 30px; }
  #mission-hud3d .timer3d, #mission-hud3d .health3d { height: 22px; }
  #mission-hud3d .timer3d strong { font-size: 20px; }
  #mission-hud3d .cargo3d, #mission-hud3d .objective-dock3d, #mission-hud3d .objective3d { height: 29px; }
  #mission-hud3d .cargo3d, #mission-hud3d .objective3d { grid-template-rows: 10px 15px 2px; }
  #mission-hud3d .cargo-head3d > .eyebrow3d, #mission-hud3d #objective-label3d { font-size: 10px; }
  #mission-hud3d #cargo-count3d, #mission-hud3d #delivery3d { font-size: 15px; }
  #mission-hud3d .recipe-heading3d { font-size: 10px; line-height: 11px; margin-bottom: 2px; }
  #mission-hud3d .recipe-chip3d { height: 19px; min-height: 19px; }
  #mission-hud3d .recipe-label3d { font-size: 12.5px; }
  #mission-hud3d .recipe-icon3d { width: 14px; height: 14px; }
  #mission-hud3d .recipe-chip3d > b { font-size: 13.5px; }
  .mission-hud3d:not(:has(.recipe-hud3d:not([hidden]))) { grid-template-rows: calc(22px + var(--mission-data-gap3d)) 29px; }
  body.alibee-3d .brand3d { left: 50%; transform: translateX(-50%); min-height: 44px; gap: 5px; padding: 3px 9px 3px 6px; border: 0; background: #fff8e8; box-shadow: 0 2px 7px #153c2e25; }
  body.alibee-3d .brand3d strong { font-size: 23px; }
  body.alibee-3d .brand3d svg { width: 23px; height: 23px; }
}
