/* Bright Furrow — warm farm interface on top of the arcade look. */
:root { --bf-wood: rgba(48, 32, 20, .86); --bf-wood2: rgba(70, 48, 30, .9); --bf-line: rgba(255, 226, 170, .22); --bf-cream: #fff4dc; --bf-gold: #ffcf4a; --bf-green: #8fe07a; --bf-red: #ff7a6b; }
.bf-g { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2a8, #f5b72c 55%, #b9761a); box-shadow: inset 0 -1px 0 rgba(0,0,0,.3); vertical-align: -2px; margin-right: 4px; }
.hud .ic, .bf-menu .ic, .bf-hotbar .ic, .bf-panel .ic { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }

/* stats */
.bf-stats { position: absolute; top: 56px; left: 14px; display: grid; gap: 6px; text-shadow: none; }
.bf-lvl { display: flex; align-items: center; gap: 8px; background: var(--bf-wood); border: 1px solid var(--bf-line); border-radius: 14px; padding: 6px 12px 6px 6px; width: 250px; }
.bf-lvl b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c7f59a, #4fa83b); color: #183010; font-size: 17px; flex: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.bf-xpbar { flex: 1; height: 8px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden; }
.bf-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #9ef07c, #ffe27a); transition: width .3s; }
.bf-lvl small { font-size: 11px; color: #e8d6b4; font-weight: 600; min-width: 66px; text-align: right; }
.bf-row { display: flex; gap: 6px; flex-wrap: wrap; max-width: 330px; }
.bf-pill { display: flex; align-items: center; gap: 5px; background: var(--bf-wood); border: 1px solid var(--bf-line); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 14px; color: var(--bf-cream); }
.bf-pill.gold { font-size: 16px; padding-left: 10px; }
.bf-pill.gold b { color: var(--bf-gold); }
.bf-pill.full { border-color: var(--bf-red); color: var(--bf-red); }
.bf-clock { font-size: 13px; color: #fff; opacity: .9; padding-left: 4px; }

/* right menu */
.bf-menu { position: fixed; top: 56px; right: 12px; z-index: 18; display: grid; gap: 6px; }
.bf-mbtn { position: relative; display: flex; align-items: center; gap: 8px; min-width: 128px; font: 700 14px var(--font); color: var(--bf-cream); background: var(--bf-wood); border: 1px solid var(--bf-line); border-radius: 12px; padding: 6px 10px; cursor: pointer; text-align: left; }
.bf-mbtn:hover, .bf-mbtn.on { background: var(--bf-wood2); border-color: rgba(255, 207, 74, .6); }
.bf-mbtn span { flex: 1; }
.bf-mbtn kbd { font-size: 10px; min-width: 18px; padding: 1px 5px; opacity: .7; }
.bf-mbtn .ic { width: 26px; height: 26px; }
.bf-mbtn.done { background: rgba(255, 207, 74, .92); color: #3a2400; justify-content: center; }
.bf-badge { position: absolute; top: -6px; left: 22px; min-width: 18px; height: 18px; border-radius: 9px; background: #6d5a44; color: #fff; font: 800 11px/18px var(--font); text-align: center; font-style: normal; padding: 0 4px; }
.bf-badge.hot { background: #45b54a; box-shadow: 0 0 10px rgba(110, 230, 100, .8); }

/* hotbar */
.bf-hotbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 18; display: flex; gap: 6px; padding: 6px; background: var(--bf-wood); border: 1px solid var(--bf-line); border-radius: 18px; }
.bf-slot { position: relative; width: 74px; height: 70px; border-radius: 13px; border: 2px solid transparent; background: rgba(255, 244, 220, .08); color: var(--bf-cream); cursor: pointer; padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 10px var(--font); }
.bf-slot .ic { width: 38px; height: 38px; }
.bf-slot small { font-size: 10px; max-width: 70px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .9; }
.bf-slot kbd { position: absolute; top: 2px; left: 3px; font-size: 9px; padding: 0 4px; min-width: 0; border-bottom-width: 1px; }
.bf-slot.on { border-color: var(--bf-gold); background: rgba(255, 207, 74, .2); box-shadow: 0 0 14px rgba(255, 207, 74, .35); }
.bf-slot[data-lvl]:not([data-lvl=""])::after { content: attr(data-lvl); position: absolute; top: 2px; right: 4px; color: var(--bf-gold); font-size: 9px; }
.bf-water { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.bf-water i { display: block; height: 100%; background: #6cc8ff; }
.bf-seedarrow { position: absolute; top: 1px; right: 2px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 10px; border-radius: 6px; padding: 0 4px; cursor: pointer; }
.bf-seedpick { position: fixed; left: 50%; bottom: 102px; transform: translateX(-50%); z-index: 19; display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; padding: 6px; background: var(--bf-wood2); border: 1px solid var(--bf-line); border-radius: 14px; }
.bf-seedopt { display: flex; flex-direction: column; align-items: center; width: 56px; padding: 4px; border-radius: 10px; border: 2px solid transparent; background: rgba(255,255,255,.06); color: var(--bf-cream); cursor: pointer; font: 700 12px var(--font); }
.bf-seedopt .ic { width: 34px; height: 34px; }
.bf-seedopt.on { border-color: var(--bf-gold); }

/* target + hints */
.bf-target { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 17; pointer-events: none; display: flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; background: rgba(30, 20, 12, .62); color: #fff; font: 700 14px var(--font); white-space: nowrap; }
.bf-target kbd { font-size: 11px; }
.bf-hint { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); padding: 7px 14px; border-radius: 12px; background: rgba(30, 20, 12, .78); color: var(--bf-cream); font-size: 15px; opacity: 0; transition: opacity .25s; text-shadow: none; white-space: nowrap; }
.bf-hint.show { opacity: 1; }
.bf-hint.bad { color: #ffd0c8; border: 1px solid rgba(255, 122, 107, .5); }
.bf-buildbar { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 18; display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(40, 90, 50, .9); color: #fff; font: 600 14px var(--font); border: 1px solid rgba(160, 255, 170, .4); }
.bf-buildbar b { color: #c9ffc0; }

.bf-layer { position: absolute; inset: 0; overflow: hidden; }
.bf-float { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 3px; font-size: 20px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.7); white-space: nowrap; will-change: transform; }
.bf-float .ic { width: 30px; height: 30px; }
.bf-float.gold b { color: var(--bf-gold); }
.bf-bub { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 2px; padding: 3px 8px 3px 3px; border-radius: 999px; background: rgba(255, 248, 230, .94); color: #3a2a18; font-size: 13px; text-shadow: none; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.bf-bub img { width: 26px; height: 26px; object-fit: contain; }
.bf-bub.ready { background: #fff7c8; animation: bfbob 1.2s ease-in-out infinite; }
.bf-bub.warn { background: #ffe0d8; color: #9a2a18; }
.bf-bub.busy { background: rgba(255, 248, 230, .75); font-size: 11px; }
@keyframes bfbob { 50% { margin-top: -5px; } }
.bf-sale { position: fixed; left: 0; top: 0; z-index: 16; display: flex; align-items: center; gap: 2px; padding: 4px 10px; border-radius: 999px; border: 2px solid #f5c542; background: rgba(48, 32, 20, .9); color: #ffe9a8; font: 800 13px var(--font); cursor: pointer; white-space: nowrap; }

/* panel */
.bf-panel { position: fixed; top: 56px; right: 150px; bottom: 100px; width: min(400px, calc(100vw - 24px)); z-index: 19; display: flex; flex-direction: column; background: var(--bf-wood); border: 1px solid var(--bf-line); border-radius: 18px; color: var(--bf-cream); box-shadow: 0 20px 60px rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.bf-ph { display: flex; align-items: center; padding: 12px 14px 8px; border-bottom: 1px solid var(--bf-line); }
.bf-ph h2 { flex: 1; font-size: 20px; }
.bf-x { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.bf-pb { overflow-y: auto; padding: 8px 12px 14px; flex: 1; }
.bf-sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #e8c98e; margin: 14px 2px 6px; }
.bf-note { font-size: 13px; color: #e6d6b8; margin: 6px 2px; line-height: 1.4; }
.bf-card { display: flex; gap: 10px; align-items: center; padding: 8px; margin: 6px 0; border-radius: 12px; background: rgba(255, 244, 220, .07); border: 1px solid rgba(255, 244, 220, .08); }
.bf-card.locked { opacity: .5; }
.bf-card.done { border-color: rgba(143, 224, 122, .5); background: rgba(143, 224, 122, .12); }
.bf-card .big, .bf-item .big { width: 46px; height: 46px; object-fit: contain; flex: none; }
.bf-ct { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bf-ct > b { font-size: 15px; }
.bf-ct small, .bf-item small { font-size: 12px; color: #d9c7a5; font-weight: 600; }
.bf-cr { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bf-cr.wide { margin: 8px 0; }
.bf-price { font-weight: 800; color: var(--bf-gold); margin-right: auto; }
.bf-price small { color: #bfe8a8; }
.bf-cost { display: flex; gap: 8px; margin-right: auto; font-weight: 800; font-size: 13px; }
.bf-cost span { display: flex; align-items: center; gap: 2px; }
.bf-cost .ic { width: 18px; height: 18px; }
.bf-cost .short { color: var(--bf-red); }
.bf-btn { font: 700 13px var(--font); border: 0; border-radius: 10px; padding: 8px 12px; background: rgba(255,255,255,.14); color: var(--bf-cream); cursor: pointer; }
.bf-btn.small { padding: 5px 9px; font-size: 12px; }
.bf-btn.primary { background: var(--bf-gold); color: #3a2400; }
.bf-btn:disabled { opacity: .4; cursor: not-allowed; }
.bf-btn:not(:disabled):hover { filter: brightness(1.1); }
.bf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.bf-item { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: rgba(255, 244, 220, .07); text-align: center; }
.bf-item > b { font-size: 16px; }
.bf-item.ready { border: 1px solid rgba(255, 207, 74, .6); }
.bf-oi { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-oi span { display: flex; align-items: center; gap: 2px; padding: 2px 8px 2px 2px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 13px; font-weight: 800; color: #ffd0c8; }
.bf-oi span.have { color: var(--bf-green); }
.bf-oh { display: flex; justify-content: space-between; align-items: baseline; }
.bf-oh .urgent { color: var(--bf-red); }
.bf-meter { display: grid; gap: 4px; font-size: 13px; font-weight: 700; margin: 4px 2px; }
.bf-mbar { height: 7px; border-radius: 5px; background: rgba(255,255,255,.14); overflow: hidden; }
.bf-mbar i { display: block; height: 100%; background: linear-gradient(90deg, #9ef07c, #ffe27a); }
.bf-unl { display: grid; gap: 4px; font-size: 13px; color: #e6d6b8; }
.bf-map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 10px auto; width: 240px; }
.bf-cell { aspect-ratio: 1; border-radius: 6px; border: 2px solid transparent; background: rgba(60, 80, 40, .6); cursor: default; }
.bf-cell.own { background: #7cc35a; }
.bf-cell.sale { background: rgba(245, 197, 66, .45); border-color: #f5c542; cursor: pointer; }
.bf-cell.sel { box-shadow: 0 0 0 3px #fff; }

.bf-tut { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 340px)); display: grid; gap: 2px; padding: 10px 40px 10px 14px; border-radius: 14px; background: rgba(40, 90, 50, .9); border: 1px solid rgba(160, 255, 170, .4); color: #fff; text-shadow: none; pointer-events: auto; }
.bf-tut small { color: #c9ffc0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.bf-tut span { font-size: 14px; font-weight: 600; line-height: 1.35; }
.bf-tut .bf-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; }
.bf-levelup { position: fixed; top: 22%; left: 50%; transform: translateX(-50%); z-index: 30; display: grid; justify-items: center; gap: 4px; padding: 16px 28px; border-radius: 20px; background: rgba(48, 32, 20, .9); border: 2px solid var(--bf-gold); color: var(--bf-cream); text-align: center; animation: bfpop .4s cubic-bezier(.2, 1.6, .4, 1); transition: opacity .5s; max-width: 90vw; }
.bf-levelup small { text-transform: uppercase; letter-spacing: .1em; color: #e8c98e; }
.bf-levelup b { font-size: 44px; color: var(--bf-gold); line-height: 1; }
.bf-levelup span { font-size: 14px; }
.bf-levelup.out { opacity: 0; }
@keyframes bfpop { from { transform: translateX(-50%) scale(.5); opacity: 0; } }

[hidden] { display: none !important; }

/* phones */
@media (max-width: 760px) {
  .bf-stats { top: 60px; left: 8px; gap: 4px; }
  .bf-lvl { width: 170px; padding: 3px 8px 3px 3px; }
  .bf-lvl b { width: 26px; height: 26px; font-size: 14px; }
  .bf-lvl small { display: none; }
  .bf-row { max-width: 200px; gap: 4px; }
  .bf-pill { font-size: 12px; padding: 2px 7px 2px 4px; }
  .bf-pill .ic { width: 16px; height: 16px; }
  .bf-clock { font-size: 11px; }
  .bf-menu { top: 60px; right: 6px; gap: 4px; }
  .bf-mbtn { min-width: 0; padding: 4px; }
  .bf-mbtn span, .bf-mbtn kbd { display: none; }
  .bf-mbtn .ic { width: 30px; height: 30px; }
  .bf-mbtn.done { padding: 6px 4px; max-width: 46px; }
  .bf-mbtn.done span { display: inline; font-size: 10px; line-height: 1.1; text-align: center; }
  .bf-hotbar { left: 6px; top: 172px; bottom: auto; transform: none; flex-direction: column; gap: 3px; padding: 3px; border-radius: 14px; }
  .bf-slot { width: 50px; height: 46px; }
  .bf-slot .ic { width: 30px; height: 30px; }
  .bf-slot small { display: none; }
  .bf-seedarrow { display: none; }
  .bf-target { bottom: 128px; font-size: 13px; }
  .bf-hint { bottom: 166px; font-size: 13px; white-space: normal; text-align: center; width: max-content; max-width: 80vw; }
  .bf-panel { top: 60px; right: 6px; left: 6px; width: auto; bottom: 124px; }
  .bf-tut { top: auto; bottom: 200px; left: 64px; transform: none; width: calc(100vw - 76px); }
  .bf-seedpick { left: 62px; top: 172px; bottom: auto; transform: none; max-width: calc(100vw - 80px); }
  .bf-buildbar { top: auto; bottom: 172px; flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); }
  .bf-buildbar span { display: none; }
}
@media (pointer: coarse) { .bf-mbtn kbd, .bf-slot kbd { display: none; } }
/* phones held sideways (and other short screens): the side menu and the hotbar used to sit on top of the touch buttons */
@media (max-height: 500px) and (min-width: 761px) {
  .bf-stats { top: 52px; left: 8px; gap: 4px; }
  .bf-lvl { width: 200px; padding: 3px 8px 3px 3px; }
  .bf-lvl b { width: 26px; height: 26px; font-size: 14px; }
  .bf-row { max-width: 230px; gap: 4px; }
  .bf-pill { font-size: 12px; padding: 2px 7px 2px 4px; }
  .bf-menu { top: 52px; right: 8px; display: flex; gap: 4px; }
  .bf-mbtn { min-width: 0; padding: 4px; }
  .bf-mbtn span, .bf-mbtn kbd { display: none; }
  .bf-mbtn .ic { width: 28px; height: 28px; }
  .bf-mbtn.done { padding: 4px 8px; }
  .bf-mbtn.done span { display: inline; font-size: 11px; }
  .bf-hotbar { bottom: 8px; gap: 3px; padding: 3px; border-radius: 14px; }
  .bf-slot { width: 50px; height: 46px; }
  .bf-slot .ic { width: 30px; height: 30px; }
  .bf-slot small { display: none; }
  .bf-seedarrow { display: none; }
  .bf-seedpick { bottom: 66px; max-width: min(520px, calc(100vw - 420px)); }
  .bf-target { bottom: 64px; font-size: 13px; }
  .bf-hint { bottom: 100px; font-size: 13px; }
  .bf-panel { top: 96px; bottom: 8px; right: 8px; }
  .bf-tut { top: 96px; width: min(420px, calc(100vw - 480px)); padding: 8px 36px 8px 12px; }
  .bf-tut span { font-size: 13px; }
  .bf-buildbar { top: 96px; }
}
