/* สวนชุมชน (client/garden.js · ใบ 119) — เมนูเล็กของแปลง ข้างจุดที่แตะ
   ชั้น Popup (--z-popup) ทั้งคอมและจอสัมผัส · ไม่ใช่ชิ้น HUD (ตำแหน่งตามจุดแตะ ไม่ได้อยู่มุมจอ) · ปุ่ม ≥ 44px (จอสัมผัส 52px)
   ไม่มี animation infinite/forwards (กฎ perf 4b) */
#garden-menu { position: fixed; z-index: var(--z-popup, 300); width: min(300px, calc(100vw - 16px)); box-sizing: border-box;
  padding: 8px 10px 8px; border-radius: 14px; color: #3a2a12; font-family: var(--font, inherit);
  background: linear-gradient(#fffaf0, #f4e6c6); border: 2px solid #e8b64a; box-shadow: 0 0 0 2px #7a4a1a, 0 6px 16px #0006;
  animation: gmPop .14s ease-out; }
#garden-menu header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 700 15px/1.25 var(--font, inherit); }
#garden-menu header span { flex: 1; min-width: 0; }
#garden-menu .gm-x { flex: none; width: 44px; height: 44px; margin: -6px -6px -6px 0; border: 0; border-radius: 50%; background: transparent; color: #7a4a1a; font-size: 18px; cursor: pointer; }
#garden-menu button[data-a] { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px;
  width: 100%; min-height: 48px; margin: 4px 0; padding: 5px 10px; text-align: left; cursor: pointer; border-radius: 10px;
  border: 1px solid #c9a26a; background: #fffdf6; color: inherit; font: inherit; }
#garden-menu button[data-a] .gm-ic { grid-row: 1 / -1; font-size: 24px; line-height: 1; text-align: center; }
#garden-menu button[data-a] .gm-ic img { display: block; width: 34px; height: 34px; object-fit: contain; }
#garden-menu button[data-a] .gm-ic i { font-style: normal; font-size: 24px; }
#garden-menu button.gm-lock { opacity: 1; background: #f4ecd9; }
#garden-menu button.gm-lock .gm-ic { opacity: .55; filter: grayscale(.6); }
#garden-menu button[data-a] small.gm-lk { grid-column: 2; color: #9a4a1a; font-weight: 700; white-space: normal; }
#garden-menu .gm-elsewhere { margin: 4px 2px; padding: 6px 9px; border-radius: 8px; background: #fbeed2; color: #7a4a1a; font: 600 12.5px/1.35 var(--font, inherit); white-space: normal; overflow-wrap: anywhere; }   /* info-ui-1022: เมล็ดของสวนอื่น → บอกที่ปลูก */
#garden-menu button[data-a] b { font: 600 14px/1.2 var(--font, inherit); }
#garden-menu button[data-a] small { font: 500 12px/1.2 var(--font, inherit); color: #7a6448; }
/* hover เฉพาะเครื่องที่มีเมาส์ — จอสัมผัสค้างสถานะ hover หลังแตะ (fish-garden-popups 16 ต.ค.: ปุ่ม "รดน้ำ" teal กลายเป็นพื้นครีม ตัวหนังสือขาว อ่านไม่ออก) */
@media (hover: hover) { #garden-menu button[data-a]:not([disabled]):not(.gm-go):hover { background: #fff3cf; border-color: #e8b64a; outline: none; } }
#garden-menu button[data-a]:not(.gm-go):focus-visible { background: #fff3cf; border-color: #e8b64a; outline: none; }
#garden-menu button.gm-go:focus-visible { outline: 2px solid #e8b64a; outline-offset: 1px; }
#garden-menu button[data-a][disabled] { opacity: .5; cursor: default; }
#garden-menu button.gm-lock[data-a][disabled] { opacity: .92; }
#garden-menu button.gm-go { background: linear-gradient(#3d8a8e, #2f6f73); border-color: #24585b; color: #fff; }
#garden-menu button.gm-go small { color: #d9f0ee; }
@media (hover: hover) { #garden-menu button.gm-go:hover { background: linear-gradient(#46989c, #33797d); } }
/* ปุ่มที่ไม่มีบรรทัดรอง (เก็บผลผลิต) — ชื่อปุ่มอยู่กลางแนวตั้ง ไม่ลอยชิดบน */
#garden-menu button[data-a] > b:last-child { grid-row: 1 / -1; }
#garden-menu p { margin: 6px 2px 2px; font: 500 13px/1.35 var(--font, inherit); color: #5a4630; }
#garden-menu footer { margin-top: 6px; padding-top: 5px; border-top: 1px dashed #d9bf8c; font: 500 11.5px/1.3 var(--font, inherit); color: #7a6448; }
#garden-menu.touch { width: min(330px, calc(100vw - 16px)); }   /* ไม่ใช้ zoom — ตำแหน่ง left/top ถูกคูณด้วย ทำให้เมนูหลุดไปทับนิ้ว */
#garden-menu.touch button[data-a] { min-height: 52px; }
#garden-menu { max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; }   /* จอเตี้ย: เมนูยาวเลื่อนเองในกล่อง ไม่ล้นจอ (ใบ 134) */
@media (max-height: 520px) { #garden-menu.touch button[data-a] { min-height: 44px; margin: 2px 0; } }
@keyframes gmPop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }

/* หน้าอันดับรายสัปดาห์ (ปลา + สวน · client/rank-faces.js) — หน้าตัวละครข้างชื่อ 40 px (มือถือ 36) · ภาพวาดครั้งเดียวต่อหน้าตา */
.cx-lb-list li.rk { grid-template-columns: 28px 44px minmax(0, 1fr) auto; }
.rk-face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; vertical-align: middle;
  background: radial-gradient(circle at 50% 35%, #fffaf0, #e9d6ab); box-shadow: 0 0 0 2px #e8b64a; }
.rk-face img { width: 100%; height: 100%; object-fit: cover; }
.rk-face img:not(.real) { width: 70%; height: 70%; opacity: .8; }
.cx-lb-list li.me .rk-face { box-shadow: 0 0 0 2px #2f6f73; }
html.touch-ui .rk-face { width: 36px; height: 36px; }
html.touch-ui .cx-lb-list li.rk { grid-template-columns: 26px 40px minmax(0, 1fr) auto; }
/* ใบ 145: กระดานรายสัปดาห์ตัวเดียว (rank-faces.js weeklyBoardHtml) — ปลา + สวน · ต่อยอด .rk-row/.rk-me/.rk-empty ของหน้าอันดับหลัก (ui-fame.css)
   ไม่มีตัวเลื่อนของตัวเอง (ตัวเลื่อนชั้นเดียว = .cx-body.wide) · การ์ดตัวเราติดล่างของกระดาน (sticky) · ไม่มี animation */
.lbw { --ink-soft: #7a6548; display: grid; gap: 4px; }
.lbw-head, .lbw .rk-row { display: grid; grid-template-columns: 36px 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.lbw-head { padding: 0 9px 2px; font: 700 11.5px var(--font-head, inherit); color: #8a6b45; border-bottom: 1px dashed #dcc898; }
.lbw-head span:nth-child(2) { grid-column: 2 / 4; }
.lbw-head span:last-child { text-align: right; }
.lbw .rk-list { margin-top: 2px; }
.lbw .rk-row { min-height: 44px; padding: 3px 9px; }
.lbw .rk-row.top1 { background: linear-gradient(90deg, #fbe7a8, #fff6dc 70%); }
.lbw .rk-row.top2 { background: linear-gradient(90deg, #e7ebee, #fbfaf6 70%); }
.lbw .rk-row.top3 { background: linear-gradient(90deg, #f3d9bf, #fdf6ec 70%); }
.lbw .rk-row.me { box-shadow: inset 0 0 0 2px #2f6f73; }
.lbw .rk-row.me .rk-face { box-shadow: 0 0 0 2px #2f6f73; }
.lbw .rk-n { font-size: 15px; display: grid; place-items: center; }
.lbw-md { width: 28px; height: auto; display: block; filter: drop-shadow(0 1px 1px #8a5a1a40); }
.lbw .rk-who b { font-size: 14px; }
.lbw .rk-who small { color: #2f6f73; font-weight: 700; }
.lbw .rk-val { color: #2f6f73; font-size: 15px; }
.lbw .rk-me .rk-val { color: #fff; }
.lbw .rk-me { margin-top: 4px; grid-template-columns: 36px minmax(0, 1fr) auto; }
.lbw-champ { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 10px; background: linear-gradient(90deg, #fff1c8, #fffaf0); border: 1px solid #e8b64a; }
.lbw-crown { width: 26px; height: auto; }
.lbw-champ span { display: grid; line-height: 1.25; min-width: 0; }
.lbw-champ small { font-size: 11.5px; color: #8a6b45; font-weight: 700; }
.lbw-champ b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbw-empty { padding: 12px; }
.lbw-empty .rk-empty-art { width: 110px; }
html.touch-ui.land .lbw-empty .rk-empty-art { width: auto; height: 64px; }
.lbw-rule { font-size: 12.5px; color: #7a6548; }
html.touch-ui .lbw-head, html.touch-ui .lbw .rk-row { grid-template-columns: 32px 38px minmax(0, 1fr) auto; gap: 6px; }
html.touch-ui .lbw .rk-me { grid-template-columns: 32px minmax(0, 1fr) auto; }
