/* Trang Xếp hạng (/nong-trai) */
.rk-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.rk-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 6px; }
.rk-head h1 span { color: var(--brand); }
.rk-village { margin: 0; }
.bar.big { height: 12px; margin-top: 10px; }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--farm, var(--brand)); border-radius: 99px; transition: width 1s ease; }
.rk-village .bar i { background: linear-gradient(90deg, #8cc35c, #3f8f3a); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip2 { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--ink-2); background: transparent; }
.chip2.on { border-style: solid; border-color: transparent; background: #e3f3e1; color: #24602a; }

.rk-farms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.fcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--farm); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.fcard.r1 { box-shadow: 0 10px 30px rgba(60, 45, 20, 0.12); }
.fc-top { display: flex; align-items: center; gap: 12px; }
.rankno { width: 38px; height: 38px; border-radius: 12px; background: var(--farm); color: #fff; font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; flex: none; }
.fcard.r1 .rankno { background: linear-gradient(135deg, #f6c95b, #e8a33a); }
.fc-name { flex: 1; min-width: 0; }
.fc-name h3 { margin: 0; font-size: 1.05rem; }
.fc-name small { color: var(--ink-2); }
.fc-score { text-align: right; }
.fc-score b { display: block; font-size: 1.9rem; line-height: 1; }
.fc-score small { color: var(--ink-2); font-size: 0.75rem; }
.fc-formula { font-size: 0.78rem; color: var(--ink-2); margin: 10px 0 12px; padding: 6px 10px; background: var(--bg); border-radius: 8px; }
.meter { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; font-size: 0.86rem; margin: 10px 0; }
.meter span { color: var(--ink-2); }
.faces { display: flex; gap: 8px; }
.face { position: relative; opacity: 0.45; filter: grayscale(0.6); }
.face.done { opacity: 1; filter: none; }
.face .av { width: 30px; height: 30px; font-size: 0.8rem; }
.face.done::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.fc-land { border-top: 1px solid var(--line); margin-top: auto; padding-top: 12px; }
.nextland { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 8px; font-size: 0.88rem; font-weight: 700; }
.nextland small { color: var(--ink-2); font-weight: 600; }

.rk-people { margin-top: 18px; }
.lb-list { list-style: none; padding: 0; margin: 0; }
.lb-list li { display: grid; grid-template-columns: 28px 36px minmax(110px, 1.2fr) 2fr 70px; gap: 12px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line); }
.lb-list li:first-child { border-top: 0; }
.lb-list li.me { background: #fdf3e2; border-radius: 10px; }
.lb-list .pos { font-weight: 800; color: var(--ink-2); text-align: center; }
.lb-list li.top .pos { color: #fff; background: #e8a33a; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.lb-list .who a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-list .who small { color: var(--ink-2); font-size: 0.76rem; }
.lb-list b { text-align: right; }
.lb-list b small { color: var(--ink-2); font-weight: 600; }

.garden { margin-bottom: 18px; }
.garden h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.garden h3::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--farm); }
.plots2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.plot2 { background: #f3ead5; border-radius: 14px; padding: 10px; border: 2px solid transparent; }
.plot2.me { border-color: var(--accent); }
.p2-head { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); margin-bottom: 8px; }
.p2-head .av { width: 28px; height: 28px; font-size: 0.78rem; box-shadow: none; }
.p2-head b { font-size: 0.9rem; }
.p2-head small { margin-left: auto; color: var(--ink-2); font-size: 0.74rem; white-space: nowrap; }
.p2-stages, .p2-grid { display: grid; grid-template-columns: 4fr 4fr 4fr; gap: 5px; }
.p2-stages span { font-size: 0.64rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.sg { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; gap: 2px; }
.sg .t { display: block; aspect-ratio: 1 / 1; }
.sg .t svg { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .rk-head { grid-template-columns: 1fr; }
  .rk-farms { grid-template-columns: 1fr; }
  .lb-list li { grid-template-columns: 26px 32px 1fr 64px; }
  .lb-list li .bar { display: none; }
}

details.garden > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px 0; }
details.garden > summary::-webkit-details-marker { display: none; }
details.garden > summary h3 { margin: 0; }
details.garden > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform 0.2s; }
details.garden[open] > summary::after { transform: rotate(225deg); }

/* thẻ nông trại: cùng một khung, cao bằng nhau */
.fc-name h3, .fc-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-formula { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-formula b { color: var(--ink); }
.fcard .meter:last-of-type { margin-bottom: 14px; }
.fl-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.88rem; }
.fl-head span { color: var(--ink-2); font-weight: 600; }
.pips { display: grid; gap: 4px; margin-top: 8px; }
.pips i { height: 9px; border-radius: 99px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.pips i.on { background: var(--farm); box-shadow: none; }
.fl-next { display: flex; justify-content: space-between; gap: 8px; margin: 9px 0 0; font-size: 0.86rem; color: var(--ink-2); }
.fl-next b { color: var(--ink); }
.fl-next span { white-space: nowrap; }
