/* ============================================================
   专注农场（Forest 式）—— 首页板块
   ============================================================ */

.farm-wrap {
	max-width: 1120px;
	margin: 26px auto;
	padding: 0 16px;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.farm-sec {
	background: #fff;
	border: 1px solid #e6e9ef;
	border-radius: 22px;
	padding: 22px 22px 24px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

/* 头部 */
.farm-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}
.farm-kicker {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	color: #3f8a63;
	margin-bottom: 4px;
}
.farm-head h2 {
	margin: 0 0 5px;
	font-size: 21px;
	color: #111827;
}
.farm-head p {
	margin: 0;
	max-width: 620px;
	font-size: 13.5px;
	line-height: 1.6;
	color: #6b7280;
}
.farm-count {
	flex: 0 0 auto;
	text-align: center;
	padding: 8px 16px;
	border-radius: 14px;
	background: #f0f9f3;
	border: 1px solid #d6ecdd;
}
.farm-count b {
	display: block;
	font-size: 24px;
	line-height: 1.1;
	color: #2f7a52;
}
.farm-count span {
	font-size: 11.5px;
	color: #6b8a76;
}

/* 主体：左计时器 + 右农场 */
.farm-body {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.farm-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 16px 14px;
	border: 1px solid #edf0f4;
	border-radius: 18px;
	background: linear-gradient(180deg, #fbfdfc 0%, #fff 100%);
}

/* 圆环进度 */
.farm-ring {
	--p: 0;
	position: relative;
	width: 138px;
	height: 138px;
	border-radius: 50%;
	background: conic-gradient(#4c9e6e calc(var(--p) * 1%), #e8eeea 0);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .25s linear;
}
.farm-ring-in {
	position: absolute;
	inset: 11px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 1px #f1f4f2;
}
.farm-time {
	position: relative;
	font-size: 27px;
	font-weight: 800;
	color: #1f2937;
	font-variant-numeric: tabular-nums;
	letter-spacing: .02em;
}
.farm-sec.is-active .farm-time { color: #2f7a52; }

.farm-status {
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #4b5563;
	min-height: 18px;
}
.farm-sec.is-active .farm-status { color: #2f7a52; }

.farm-btns {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	width: 100%;
}
.farm-btn {
	flex: 1 1 auto;
	padding: 10px 14px;
	border: 0;
	border-radius: 11px;
	background: #3f8a63;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, transform .1s;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}
.farm-btn:hover { background: #347653; }
.farm-btn:active { transform: translateY(1px); }
.farm-btn.is-ghost {
	background: #f3f4f6;
	color: #6b7280;
	flex: 0 0 auto;
}
.farm-btn.is-ghost:hover { background: #e9ebef; }
.farm-btn[hidden] { display: none; }

.farm-hint {
	margin: 12px 0 0;
	font-size: 11.5px;
	line-height: 1.55;
	color: #9ca3af;
}

/* 农场网格 */
.farm-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: flex-start;
	min-height: 120px;
	padding: 4px 0;
}
.farm-plot {
	width: 84px;
	height: 108px;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	padding: 6px 4px 7px;
	box-sizing: border-box;
	background: #f8faf9;
	border: 1px solid #edf1ee;
	position: relative;
}
.farm-plot.is-empty {
	background: transparent;
	border: 1.5px dashed #e2e8e4;
	color: #cbd5cf;
	font-size: 22px;
	align-items: center;
	justify-content: center;
}
.farm-plot.is-growing {
	background: #f2faf5;
	border-color: #cfe8d8;
}
.farm-tree {
	width: 62px;
	height: 74px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.farm-plot.is-growing .farm-tree {
	transform: scale(var(--grow, .3));
	transform-origin: 50% 100%;
	transition: transform .6s cubic-bezier(.2, .8, .3, 1);
}
.farm-tag {
	margin-top: 3px;
	font-size: 10.5px;
	color: #6b8a76;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.farm-tag b {
	color: #d99a1e;
}

/* SVG 树 */
.ft-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ft-shadow { fill: rgba(15, 23, 42, .08); }
.ft-trunk { fill: var(--c3, #7c5a3a); }
.ft-canopy > circle,
.ft-canopy > polygon,
.ft-canopy > rect,
.ft-canopy > ellipse,
.ft-canopy > path { fill: var(--c1, #2f6f4e); }
.ft-canopy .ft-hi { fill: var(--c2, #3f8a63) !important; }
.ft-canopy .ft-dot circle { fill: #fff; opacity: .92; }
.ft-branch { fill: none; stroke: var(--c3, #7c5a3a); stroke-width: 3.5; stroke-linecap: round; }
.ft-aura { fill: var(--c1, #2f6f4e); opacity: .14; }
.ft-star { fill: #f2c14e; }

.farm-tree.tier-2 .ft-svg { filter: drop-shadow(0 2px 6px rgba(242, 193, 78, .45)); }
.farm-tree.tier-3 .ft-svg { filter: drop-shadow(0 2px 10px rgba(242, 193, 78, .7)); }

/* 长成瞬间的弹出 */
@keyframes farm-pop {
	0% { transform: scale(.6); opacity: .3; }
	60% { transform: scale(1.12); }
	100% { transform: scale(1); opacity: 1; }
}
.farm-plot.is-just { animation: farm-pop .5s ease; }

/* 访客态 */
.farm-panel.is-guest {
	padding: 34px 18px;
	grid-column: 1 / -1;
}
.farm-guest-ico { font-size: 34px; margin-bottom: 6px; }
.farm-panel.is-guest h3 { margin: 0 0 6px; font-size: 17px; color: #111827; }
.farm-panel.is-guest p { margin: 0 0 14px; font-size: 13.5px; color: #6b7280; max-width: 420px; line-height: 1.6; }
.farm-panel.is-guest .farm-btn { flex: 0 0 auto; padding: 10px 26px; }

/* 响应式 */
/* ============================================================
   v1.34.0：金币 / 选种 / 树种商店 / 排行榜 / 参观
   ============================================================ */

.farm-stats { display: flex; gap: 8px; flex: 0 0 auto; }
.farm-count.is-wallet { background: #fff8e8; border-color: #f3e5c3; }
.farm-count.is-wallet b { color: #a8790f; }

/* 种子选择条 */
.farm-seeds {
	display: flex;
	gap: 6px;
	width: 100%;
	margin-top: 12px;
	padding: 2px 2px 4px;
	overflow-x: auto;
	scrollbar-width: none;
}
.farm-seeds::-webkit-scrollbar { display: none; }
.farm-seed {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 9px;
	border: 1px solid #e3e8e4;
	border-radius: 999px;
	background: #fff;
	color: #4b5563;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
}
.farm-seed i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.farm-seed b { font-weight: 600; font-size: 10.5px; color: #a3aca7; }
.farm-seed.is-on {
	border-color: #3f8a63;
	background: #eefaf3;
	color: #2f7a52;
	box-shadow: 0 0 0 2px rgba(63, 138, 99, .12);
}
.farm-seed.is-on b { color: #3f8a63; }
.farm-seeds.is-lock { opacity: .5; pointer-events: none; }

/* 标签页 */
.farm-main { min-width: 0; }
.farm-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.farm-tab {
	padding: 6px 13px;
	border: 1px solid #e6e9ef;
	border-radius: 9px;
	background: #fbfcfb;
	color: #6b7280;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}
.farm-tab.is-on { background: #3f8a63; border-color: #3f8a63; color: #fff; }
.farm-pane[hidden] { display: none; }

/* 树种商店 */
.shop-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
	gap: 10px;
}
.shop-item {
	display: flex;
	gap: 10px;
	padding: 10px;
	border: 1px solid #edf1ee;
	border-radius: 14px;
	background: #fbfdfc;
}
.shop-tree {
	flex: 0 0 54px;
	height: 64px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 3px;
	border: 1px solid #f0f3f1;
	border-radius: 11px;
	background: #fff;
}
.shop-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.shop-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: #1f2937; }
.shop-rar { padding: 1px 6px; border-radius: 6px; background: #f4f6f5; font-size: 10px; font-weight: 600; }
.shop-have { font-size: 10px; font-weight: 500; color: #9ca3af; }
.shop-desc { margin: 3px 0 7px; font-size: 11px; line-height: 1.5; color: #8a9490; }
.shop-foot { margin-top: auto; }
.shop-buy {
	padding: 5px 12px;
	border: 0;
	border-radius: 9px;
	background: #3f8a63;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}
.shop-buy:hover { background: #347653; }
.shop-buy:disabled { background: #edeff0; color: #9aa5a1; cursor: default; }
.shop-buy[data-lack] { background: #f6f1e2; color: #ab8a34; }

/* 排行榜 */
.farm-rankbox { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #e6ebe8; }
.farm-rankhead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.farm-rankhead h3 { margin: 0; font-size: 15px; color: #111827; }
.farm-rankhead span { font-size: 12px; color: #8a9490; }
.farm-rankhead b { color: #2f7a52; }
.farm-ranklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
.rank-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 9px;
	border-radius: 10px;
	color: #374151;
	text-decoration: none;
}
.rank-row:hover { background: #f6faf8; }
.rank-row.is-me { background: #effaf3; box-shadow: inset 0 0 0 1px #cfe8d8; }
.rank-no {
	flex: 0 0 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	background: #f2f5f3;
	color: #7c8a82;
	font-size: 11.5px;
	font-weight: 800;
}
.rank-row.is-top1 .rank-no { background: #fdf3d6; color: #b5860b; }
.rank-row.is-top2 .rank-no { background: #eff2f6; color: #7b8797; }
.rank-row.is-top3 .rank-no { background: #faeee3; color: #ac7038; }
.rank-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.rank-name em { margin-left: 6px; font-style: normal; font-size: 10.5px; font-weight: 400; color: #9ca3af; }
.rank-meta { flex: 0 0 auto; font-size: 11.5px; color: #8a9490; white-space: nowrap; }
.rank-meta b { color: #2f7a52; }
.rank-meta em { margin-left: 6px; font-style: normal; color: #b0b8b4; }
.rank-go { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #a9bdb2; }
.rank-row:hover .rank-go { color: #3f8a63; }
.rank-empty,
.farm-empty {
	flex-basis: 100%;
	width: 100%;
	padding: 22px 10px;
	text-align: center;
	font-size: 12.5px;
	line-height: 1.6;
	color: #a3aca7;
}

/* 参观页 */
.fv-side { padding: 20px 16px; }
.fv-avatar {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
	border-radius: 18px;
	color: #fff;
	font-size: 24px;
	font-weight: 800;
}
.fv-name { margin: 0 0 3px; font-size: 16px; color: #111827; }
.fv-sub { margin: 0 0 14px; font-size: 12px; color: #9ca3af; }
.fv-figures { display: flex; justify-content: center; gap: 16px; width: 100%; margin-bottom: 14px; }
.fv-figures div { text-align: center; }
.fv-figures b { display: block; font-size: 15px; color: #2f7a52; }
.fv-figures span { font-size: 10.5px; color: #9ca3af; }
.fv-side .farm-btn { width: 100%; }
.fv-board { margin-top: 18px; }
.fv-nope { padding: 44px 22px; text-align: center; }
.fv-nope h2 { margin: 0 0 8px; font-size: 20px; color: #111827; }
.fv-nope p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.7; color: #6b7280; }
.fv-nope .farm-btn { flex: 0 0 auto; padding: 9px 20px; }

/* 响应式 */
@media (max-width: 760px) {
	.farm-body { grid-template-columns: 1fr; }
	.farm-panel { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; text-align: left; }
	.farm-ring { width: 104px; height: 104px; }
	.farm-time { font-size: 22px; }
	.farm-status { margin: 0; min-height: 0; }
	.farm-btns { width: auto; margin: 0; }
	.farm-seeds { flex-basis: 100%; margin-top: 6px; }
	.farm-hint { flex-basis: 100%; width: 100%; margin-top: 4px; }
	.farm-grid { justify-content: center; }
	.farm-ranklist { grid-template-columns: 1fr; }
	.rank-go { opacity: 1; }
	.fv-side { flex-direction: column; text-align: center; }
}
@media (max-width: 460px) {
	.farm-sec { padding: 18px 14px; }
	.farm-head { flex-direction: column; gap: 8px; }
	.farm-count { align-self: flex-start; }
	.farm-stats { align-self: flex-start; }
	.farm-plot { width: 72px; height: 96px; }
	.farm-tree { width: 54px; height: 64px; }
	.shop-list { grid-template-columns: 1fr; }
	.farm-tabs { width: 100%; }
	.farm-tab { flex: 1 1 0; text-align: center; }
}

/* 排行榜：本班 / 年级总榜 */
.farm-me {
	margin: 0 0 8px;
	font-size: 12px;
	color: #8a9490;
}
.farm-me b {
	color: #2f7a52;
	font-size: 13px;
}
.farm-rankfoot {
	margin: 8px 0 0;
	font-size: 11.5px;
	color: #a3adaa;
}
.farm-rankhead .lb-tabs {
	margin-left: auto;
}
@media (max-width: 560px) {
	.farm-rankhead {
		align-items: center;
	}
	.farm-rankhead .lb-tabs {
		margin-left: 0;
		width: 100%;
	}
}

/* ---------------------------------------------------------------
 * 卖树：松鼠树 / 大树右上角价签 + 底部确认条 + 轻提示
 * --------------------------------------------------------------- */
.ft-sq-tail,
.ft-sq-body { fill: #b06a3b; }
.ft-sq-head { fill: #c9824c; }
.ft-sq-ear { fill: #a35f33; }
.ft-sq-eye { fill: #2b1a10; }
.ft-sq-paw { fill: none; stroke: #8a4e28; stroke-width: 1.6; stroke-linecap: round; }

.farm-plot.is-grown {
	position: relative;
	cursor: pointer;
	transition: box-shadow .15s, transform .1s;
}
.farm-plot.is-grown:hover {
	box-shadow: 0 6px 18px rgba(20, 60, 40, .13);
}
.farm-plot.is-grown:active {
	transform: translateY(1px);
}
.farm-plot.is-grown:focus-visible {
	outline: 2px solid #3f8a63;
	outline-offset: 2px;
}
/* 卖出按钮：贴在地块右上角的实心金胶囊，一眼看出能点 */
.farm-price {
	position: absolute;
	top: 2px;
	right: 2px;
	padding: 1px 5px;
	border-radius: 8px;
	background: linear-gradient(180deg, #f5b445, #e59a26);
	color: #fff;
	font-style: normal;
	font-size: 8.5px;
	font-weight: 700;
	line-height: 12px;
	letter-spacing: 0;
	white-space: nowrap;
	text-align: center;
	box-shadow: 0 2px 6px rgba(191, 128, 22, .38);
	transition: transform .12s ease, box-shadow .12s ease;
}
.farm-plot.is-grown:hover .farm-price {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(191, 128, 22, .45);
}
.farm-plot.is-grown::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
	border: 1.5px solid transparent;
	pointer-events: none;
	transition: border-color .15s;
}
.farm-plot.is-grown:hover::after {
	border-color: rgba(229, 154, 38, .55);
}

/* 大松树挂的松果 */
.ft-cone { fill: #b4763c; }
.ft-cone-s { fill: none; stroke: #7d4b20; stroke-width: .95; stroke-linecap: round; opacity: .5; }
.ft-cone-t { fill: none; stroke: #6f8f5e; stroke-width: 1.5; stroke-linecap: round; }

.farm-sellbox {
	position: fixed;
	left: 50%;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 2147483060;
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity .16s ease, transform .16s ease;
	pointer-events: none;
}
.farm-sellbox[hidden] {
	display: none !important;
}
.farm-sellbox.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
	pointer-events: auto;
}
.fsb-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #e3ece5;
	border-radius: 14px;
	box-shadow: 0 16px 42px rgba(20, 60, 40, .2);
}
.fsb-txt {
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-size: 11.5px;
	color: #6b8a76;
	white-space: nowrap;
}
.fsb-txt b {
	font-size: 13px;
	color: #1f2937;
}
.fsb-price {
	font-style: normal;
	font-size: 13px;
	font-weight: 800;
	color: #b8862b;
}
.fsb-btns {
	display: flex;
	gap: 6px;
}
.fsb-btns .farm-btn {
	flex: 0 0 auto;
	padding: 7px 13px;
	border-radius: 9px;
	font-size: 13px;
}

.farm-toast {
	position: fixed;
	left: 50%;
	bottom: calc(96px + env(safe-area-inset-bottom, 0px));
	z-index: 2147483150;
	max-width: 80vw;
	padding: 9px 14px;
	border-radius: 12px;
	background: rgba(24, 40, 32, .92);
	color: #fff;
	font-size: 12.5px;
	line-height: 1.4;
	text-align: center;
	opacity: 0;
	transform: translate(-50%, 8px);
	transition: opacity .18s ease, transform .18s ease;
	pointer-events: none;
}
.farm-toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (max-width: 560px) {
	.fsb-card {
		gap: 8px;
		padding: 9px 10px;
	}
	.fsb-txt {
		font-size: 11px;
	}
	.fsb-txt b {
		font-size: 12px;
	}
	.fsb-btns .farm-btn {
		padding: 7px 11px;
		font-size: 12.5px;
	}
}
