/* Экран фермы: поле, грядки, действия */

.board {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 14px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, #BFE38C 0%, #97CF6A 42%, #7CBB53 100%);
    border: 1px solid #6FAE49;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), var(--shadow);
}

:root[data-theme="dark"] .board {
    background:
        radial-gradient(120% 80% at 50% -10%, #4E7434 0%, #3C5C28 45%, #2E481F 100%);
    border-color: #3B5A27;
}

/* Трава: мелкая текстура точками */
.board::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .18) 0 2px, transparent 2px),
        radial-gradient(circle at 70% 60%, rgba(0, 0, 0, .06) 0 2px, transparent 2px);
    background-size: 26px 26px, 34px 34px;
    opacity: .7;
    pointer-events: none;
}

.board-scene {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 40px;
    font-size: 27px;
    line-height: 1;
    filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .18));
}

.board-scene .scene-side {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.board-scene .scene-item {
    animation: sway 4s ease-in-out infinite;
    transform-origin: bottom center;
}

.board-scene .scene-item:nth-child(2n) {
    animation-delay: -1.4s;
}

@keyframes sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.plots {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

@media (min-width: 620px) {
    .plots {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 11px;
    }
}

.plot {
    position: relative;
    aspect-ratio: 1 / .92;
    border-radius: 13px;
    background: linear-gradient(180deg, #A9713F 0%, #8C5A2F 55%, #77491F 100%);
    border: 1px solid #6A421D;
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .18),
        inset 0 -4px 8px rgba(0, 0, 0, .28),
        0 3px 0 rgba(0, 0, 0, .16);
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: transform .14s ease, box-shadow .14s ease;
}

.plot::before {
    /* борозды */
    content: "";
    position: absolute;
    inset: 6px 5px;
    border-radius: 8px;
    background: repeating-linear-gradient(
        180deg,
        rgba(0, 0, 0, .16) 0 3px,
        rgba(255, 255, 255, .05) 3px 9px
    );
    opacity: .55;
    pointer-events: none;
}

.plot:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), 0 1px 0 rgba(0, 0, 0, .16);
}

.plot.selected {
    outline: 3px solid #FFD75E;
    outline-offset: 1px;
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .18),
        0 0 0 6px rgba(255, 215, 94, .25),
        0 3px 0 rgba(0, 0, 0, .16);
}

.plot.is-locked {
    background: linear-gradient(180deg, #8E9B72 0%, #74815C 100%);
    border-color: #5E6A48;
}

.plot.is-locked::before {
    opacity: .25;
}

.plot.is-empty .plot-hint {
    font-size: 20px;
    opacity: .35;
    color: #fff;
}

.plot-crop {
    position: relative;
    font-size: clamp(24px, 8vw, 40px);
    line-height: 1;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3));
    transform: scale(var(--scale, 1));
    transition: transform .4s ease;
}

.plot.is-ready .plot-crop {
    animation: crop-bounce 1.6s ease-in-out infinite;
}

@keyframes crop-bounce {
    0%, 100% { transform: scale(var(--scale, 1)) translateY(0); }
    50% { transform: scale(calc(var(--scale, 1) * 1.06)) translateY(-3px); }
}

.plot.is-ready {
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .2),
        0 0 0 3px rgba(255, 215, 94, .55),
        0 4px 12px rgba(255, 190, 40, .4);
}

.plot-timer {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(28, 20, 12, .72);
    color: #FFEFD2;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    white-space: nowrap;
}

.plot-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 11px;
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}

.plot-badge.water {
    background: var(--blue);
    right: auto;
    left: 5px;
}

.plot-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #FFF6E0;
    font-size: 11px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.plot-lock .lock-ico {
    font-size: 19px;
}

.plot-progress {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 3px;
    height: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    overflow: hidden;
}

.plot-progress > i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #FFD75E, #8CD05B);
}

/* --------------------------------------------------------- действия */

.actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    position: relative;
}

@media (min-width: 620px) {
    .actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.actions .btn {
    padding: 12px 10px;
    font-size: 13.5px;
}

.action-hint {
    margin-top: 8px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(31, 55, 18, .72);
}

:root[data-theme="dark"] .action-hint {
    color: rgba(226, 240, 214, .72);
}

/* ---------------------------------------------------- быстрые действия */

.quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 11px 4px;
    border-radius: var(--radius);
    background: var(--panel-2);
    border: 1px solid var(--line-soft);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    transition: transform .12s ease, background .12s ease;
}

.quick-btn .q-ico {
    font-size: 22px;
    line-height: 1;
}

.quick-btn:active {
    transform: translateY(2px);
    background: var(--panel-3);
}

/* ------------------------------------------------------- выбор семян */

.seed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seed-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--panel-2);
    border: 1px solid var(--line-soft);
    text-align: left;
    width: 100%;
    transition: transform .12s ease;
}

.seed-row:active {
    transform: scale(.985);
}

.seed-row:disabled {
    opacity: .5;
}

.item-ico {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 23px;
    background: var(--panel-3);
    border: 1px solid var(--line-soft);
}

.item-body {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 800;
    font-size: 14.5px;
}

.item-meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.empty-state {
    text-align: center;
    padding: 28px 16px;
    color: var(--muted);
}

.empty-state .empty-ico {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
    opacity: .8;
}
