/* 猫田小日子 v1.16 — 地力卡片 · 地力开关 · 钱掌柜收粮（一屏平铺） */

/* ---------------------------------------------------------------- 地力：对准的那一格 */
#fert-card { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 30; display: none; align-items: center; gap: 8px;
  padding: 5px 12px 6px; background: rgba(243, 234, 213, .94); border: 1px solid rgba(64, 52, 36, .45); border-radius: 3px;
  box-shadow: 0 2px 0 rgba(40, 34, 30, .25); font-size: 12px; color: #3b3326; pointer-events: none; flex-wrap: wrap; max-width: 380px; }
#fert-card.on { display: flex; }
#fert-card .brush { font-size: 15px; letter-spacing: 2px; }
#fert-card .fc-num { font-size: 20px; font-weight: 700; min-width: 26px; text-align: right; }
#fert-card .fc-bar { position: relative; width: 96px; height: 7px; background: rgba(60, 50, 36, .14); border-radius: 4px; overflow: visible; }
#fert-card .fc-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
#fert-card .fc-bar em { position: absolute; top: -2px; bottom: -2px; width: 1px; background: rgba(40, 34, 24, .5); }
#fert-card .fc-tag { border: 1px solid; padding: 0 5px; border-radius: 2px; font-size: 12px; letter-spacing: 2px; }
#fert-card .fc-sub { color: #6a5d45; }
#fert-card small { flex-basis: 100%; color: #7d6f55; font-size: 12px; }

/* ---------------------------------------------------------------- 地力开关（小院里才有） */
#btn-fert { display: none; pointer-events: auto; padding: 1px 8px 2px; font-size: 13px; letter-spacing: 4px; line-height: 1.6; color: #3f4a2e; background: #e3e2c6; }
#btn-fert.shown { display: block; }
#btn-fert.on { background: #6d8a4c; color: #f6f1e2; }

/* ---------------------------------------------------------------- 收粮：一屏看全 */
.pbox.inkbox.merbox { width: min(820px, 97vw); max-height: 94vh; padding: 12px 16px 12px; }
.merbox .ink-head { margin-bottom: 4px; }
.mer2 { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.m2-side { display: flex; flex-direction: column; gap: 3px; border-right: 1px solid rgba(40, 34, 22, .18); padding-right: 12px; }
.m2-side b.brush { font-size: 24px; letter-spacing: 4px; }
.m2-side > span { font-size: 12px; color: #86795f; letter-spacing: 2px; }
.m2-side p { font-size: 12px; line-height: 1.55; color: #3b3326; margin: 4px 0; }
.m2-side small { color: #8a3b2c; }
.mo { position: relative; margin-top: 6px; padding: 6px 8px; border: 1px solid rgba(138, 59, 44, .4); background: rgba(255, 250, 238, .5); font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.mo-t { color: #8a3b2c; letter-spacing: 2px; }
.mo b { font-size: 14px; }
.mo-bar { height: 5px; background: rgba(60, 50, 36, .15); border-radius: 3px; }
.mo-bar i { display: block; height: 100%; background: #a8392b; border-radius: 3px; }
.mo .seal-s { position: absolute; right: 6px; top: 6px; }
.m2-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 8px; border-bottom: 1px dashed rgba(40, 34, 22, .25); margin-bottom: 8px; font-size: 13px; }
.m2-top b { font-size: 16px; color: #8a3b2c; }
.m2-tab { width: 100%; border-collapse: collapse; font-size: 12px; }
.m2-tab thead th { font-weight: normal; color: #7d6f55; font-size: 12px; letter-spacing: 1px; text-align: left; padding: 0 6px 4px; border-bottom: 1px solid rgba(40, 34, 22, .25); }
.m2-tab tbody tr { border-bottom: 1px dashed rgba(40, 34, 22, .18); opacity: .55; }
.m2-tab tbody tr.has { opacity: 1; background: rgba(236, 244, 214, .45); }
.m2-tab th, .m2-tab td { padding: 3px 6px; vertical-align: middle; text-align: left; }
.m2-tab tbody th { white-space: nowrap; }
.m2-tab tbody th .icon, .m2-tab tbody th i, .m2-tab tbody th img { vertical-align: middle; }
.m2-tab tbody th b { font-size: 15px; letter-spacing: 2px; margin-left: 4px; vertical-align: middle; }
.m2-tab td b { font-size: 16px; color: #2c2a22; }
.m2-tab td small { font-size: 12px; color: #7d6f55; margin-left: 1px; }
.m2-tab td i { display: inline-block; margin-left: 6px; font-style: normal; font-size: 12px; color: #2f5a24; font-weight: 700; }
.m2-tab td em { display: block; font-style: normal; font-size: 12px; color: #4f6f86; line-height: 1.3; }
.m2-tab td em.has { font-weight: 700; }
.m2-tab td.na { color: #b2a58a; }
.m2-tab td.barn { color: #6a7a45; white-space: nowrap; }
.m2-tab td.go { text-align: right; white-space: nowrap; }
.pbox.inkbox button.m2b { background: #f3ead2 !important; color: #3b3326 !important; border: 1px solid rgba(64, 52, 36, .55) !important; border-radius: 3px !important; padding: 3px 9px !important; font-size: 12px !important; letter-spacing: 1px !important; min-height: 0 !important; box-shadow: none !important; font-family: inherit !important; writing-mode: horizontal-tb !important; white-space: nowrap; }
.pbox.inkbox button.m2b.main { background: #8a3b2c !important; color: #f6efdc !important; border-color: #5e2419 !important; font-size: 13px !important; padding: 4px 12px !important; }
@media (max-height: 420px) { .pbox.inkbox.merbox { padding: 8px 12px; } .m2-side p { display: none; } .m2-tab th, .m2-tab td { padding: 2px 5px; } }
#hud #hud-tr .tr-row2 { display: flex; gap: 4px; align-self: stretch; }
#hud #hud-tr .tr-row2 > button { flex: 1; }
#hud #hud-tr .tr-row2 #btn-fert { flex: 0 0 auto; }
.m2-tab .ico { --s: 30px; }
.m2-tab tbody th, .m2-tab tbody td { padding-top: 2px; padding-bottom: 2px; }
.m2-tab tbody th b { font-size: 14px; }
.m2-top { padding-bottom: 5px; margin-bottom: 4px; }
.merbox .m2-side p { font-size: 12px; }

/* ---------------------------------------------------------------- 伤势小印（时间栏旁） */
#hud-seals { position: absolute; left: 100%; top: 4px; margin-left: 6px; display: flex; gap: 3px; pointer-events: auto; }
#hud-seals img { width: 24px; height: 24px; image-rendering: pixelated; cursor: pointer; filter: drop-shadow(0 1px 0 rgba(40, 34, 30, .35)); }

/* ---------------------------------------------------------------- 山里人的买卖：一屏两栏 */
.t6 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.t6-col h4 { margin: 0 0 6px; font-weight: normal; font-size: 13px; letter-spacing: 3px; color: #8a3b2c; border-bottom: 1px solid rgba(40, 34, 22, .25); padding-bottom: 3px; }
.t6-row { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 6px; padding: 3px 2px; border-bottom: 1px dashed rgba(40, 34, 22, .15); }
.t6-row .ico { --s: 30px; }
.t6-row b { font-size: 14px; letter-spacing: 1px; display: block; }
.t6-row small { font-size: 12px; color: #7d6f55; display: block; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.t6-row .t6-p { font-size: 13px; color: #2c2a22; white-space: nowrap; }
.t6-row.lack, .t6-row.none { opacity: .5; }
.t6 #t6-all { margin-top: 8px; width: 100%; }
@media (max-height: 420px) { .t6-row small { display: none; } }

/* v1.16 后山: the item sheets grew (row 13–15 = mountain goods) — new URL so an old cached copy isn't used */
.ico { background-image: url(../assets/ui/items_hd.webp?v=1192); }
