.account-profile-actions {
    display: grid;
    gap: 9px;
}

.account-mini-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
}

.account-mini-form .account-field {
    min-width: 0;
}

.account-mini-form .account-action {
    min-height: 45px;
    white-space: nowrap;
}

#upgrade-overlay {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: radial-gradient(ellipse at center, rgba(60,30,8,0.55), rgba(20,10,2,0.78));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 32;
}

#upgrade-overlay.open { display: grid; animation: refillFadeIn 200ms ease; }

#upgrade-panel {
    width: min(460px, calc(100vw - 28px));
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 20px 20px 18px;
    border: 4px solid #fff7df;
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 14%, rgba(255,255,255,0.7), transparent 60%),
        linear-gradient(160deg, #fff5cb 0%, #f0c46a 50%, #c47a2c 100%);
    box-shadow: 0 22px 48px rgba(0,0,0,0.45), inset 0 4px 0 rgba(255,255,255,0.8);
    font-family: "Cooper Black", "Comic Sans MS", "Arial Black", sans-serif;
    color: #3f260f;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.55);
    animation: refillPopIn 320ms cubic-bezier(0.34,1.56,0.64,1);
}

.upgrade-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.upgrade-title { font-size: 1.32rem; line-height: 1; }

.upgrade-subtitle { margin-top: 6px; font-size: 0.78rem; opacity: 0.85; }

#upgrade-list { display: grid; gap: 12px; }

.upgrade-card {
    padding: 14px;
    border: 3px solid rgba(94,58,26,0.34);
    border-radius: 16px;
    background: linear-gradient(160deg, #fffbe8 0%, #ffe6a8 100%);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.7), 0 4px 0 rgba(124,72,18,0.4);
}

.upgrade-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.upgrade-name { font-size: 1.05rem; line-height: 1; }

.upgrade-level-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #c47a2c;
    color: #6b3a1a;
    font-size: 0.7rem;
    line-height: 1;
    white-space: nowrap;
}

.upgrade-desc { margin-top: 6px; font-size: 0.78rem; opacity: 0.86; }

.upgrade-stat-row {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.upgrade-buy {
    margin-top: 12px;
    width: 100%;
    padding: 10px 12px 11px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffd55a, #e08a1b);
    color: #3a1f08;
    font-family: inherit;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.65), 0 4px 0 #8a4810;
}

.upgrade-buy:hover { filter: brightness(1.06); }

.upgrade-buy:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,0.6), 0 1px 0 #8a4810; }

.upgrade-buy:disabled { cursor: not-allowed; opacity: 0.7; filter: grayscale(0.3); }

.upgrade-card.maxed .upgrade-buy {
    background: linear-gradient(180deg, #b9e6a4, #58a548);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.65), 0 4px 0 #2f5f24;
    color: #14380a;
}

#auto-waterer-overlay {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 34;
    background: radial-gradient(ellipse at center, rgba(9,79,112,0.54), rgba(8,28,47,0.78));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#auto-waterer-overlay.open {
    display: grid;
    animation: refillFadeIn 180ms ease;
}

#auto-waterer-panel {
    width: min(430px, calc(100vw - 28px));
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 18px;
    border: 4px solid #e8fbff;
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 15%, rgba(255,255,255,0.8), transparent 50%),
        linear-gradient(155deg, #d7fbff 0%, #68ceff 54%, #1680c7 100%);
    box-shadow: 0 22px 44px rgba(0,0,0,0.42), inset 0 4px 0 rgba(255,255,255,0.78);
    color: #07345d;
    font-family: "Cooper Black", "Comic Sans MS", "Arial Black", sans-serif;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.62);
}

.auto-waterer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.auto-waterer-title { font-size: 1.2rem; line-height: 1; }

.auto-waterer-subtitle { margin-top: 6px; font-size: 0.74rem; opacity: 0.82; }

#auto-waterer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 10px;
}

.auto-plot-button {
    appearance: none;
    border: 3px solid rgba(255,255,255,0.8);
    border-radius: 16px;
    padding: 12px 10px;
    background:
        radial-gradient(circle at 26% 24%, rgba(255,255,255,0.8), transparent 28%),
        linear-gradient(145deg, #fff9b8, #72e681);
    color: #12401f;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.65), 0 4px 0 rgba(21,102,42,0.48);
}

.auto-plot-button.selected {
    border-color: #fff36f;
    background: linear-gradient(145deg, #fff36f, #2fdcff);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.74), 0 4px 0 #0c6f9f, 0 0 18px rgba(255,243,111,0.72);
}

.auto-plot-button:disabled {
    cursor: wait;
    filter: grayscale(0.4);
}

.auto-plot-name {
    display: block;
    font-size: 0.82rem;
    line-height: 1;
}

.auto-plot-meta {
    display: block;
    margin-top: 6px;
    font-family: "Arial Black", sans-serif;
    font-size: 0.62rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.auto-waterer-empty {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.5);
    font-size: 0.82rem;
}

#plot-sale-overlay {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 36;
    background: radial-gradient(ellipse at center, rgba(77,49,8,0.56), rgba(16,8,2,0.78));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#plot-sale-overlay.open {
    display: grid;
    animation: refillFadeIn 180ms ease;
}

#plot-sale-panel {
    width: min(430px, calc(100vw - 28px));
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    padding: 18px;
    border: 4px solid #fff7df;
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 15%, rgba(255,255,255,0.78), transparent 48%),
        linear-gradient(155deg, #fff7be 0%, #ffc33d 48%, #d36a17 100%);
    box-shadow: 0 22px 48px rgba(0,0,0,0.45), inset 0 4px 0 rgba(255,255,255,0.8);
    color: #3e2109;
    font-family: "Cooper Black", "Comic Sans MS", "Arial Black", sans-serif;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.56);
    animation: refillPopIn 300ms cubic-bezier(0.34,1.56,0.64,1);
}

.plot-sale-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.plot-sale-title { font-size: 1.22rem; line-height: 1; }

.plot-sale-subtitle { margin-top: 6px; font-size: 0.74rem; line-height: 1.2; opacity: 0.84; }

.plot-sale-form,

.plot-sale-info {
    display: grid;
    gap: 10px;
}

.plot-sale-field {
    display: grid;
    gap: 5px;
    font-size: 0.68rem;
    text-transform: uppercase;
}

.plot-sale-field input,

.plot-sale-field select,

.plot-sale-field textarea {
    min-width: 0;
    padding: 11px 12px;
    border: 3px solid rgba(88,45,12,0.28);
    border-radius: 14px;
    background: rgba(255,255,255,0.82);
    color: #2a1606;
    font-family: "Arial Black", sans-serif;
    font-size: 0.86rem;
    outline: none;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.68);
}

.plot-sale-field textarea {
    min-height: 76px;
    resize: vertical;
    line-height: 1.2;
    font-family: "Arial Black", sans-serif;
}

.plot-sale-field input:focus,

.plot-sale-field select:focus,

.plot-sale-field textarea:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.26), inset 0 2px 0 rgba(255,255,255,0.8);
}

.plot-sale-stat {
    padding: 10px 12px;
    border: 3px solid rgba(88,45,12,0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.58);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.6);
}

.plot-sale-stat strong {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    opacity: 0.72;
}

.plot-sale-stat span {
    display: block;
    margin-top: 4px;
    font-size: 0.98rem;
    line-height: 1.05;
}

.plot-sale-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
}

.plot-sale-action {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 11px 12px;
    background: linear-gradient(180deg, #ffd55a, #e08a1b);
    color: #3a1f08;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.65), 0 4px 0 #8a4810;
}

.plot-sale-action.secondary {
    background: linear-gradient(180deg, #fff, #ffe6a8);
}

.plot-sale-action.danger {
    background: linear-gradient(180deg, #ffb7b7, #e43838);
    color: #fff8dc;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.65), 0 4px 0 #8b1515;
}

.plot-sale-action:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    filter: grayscale(0.3);
}

.plot-sale-message {
    min-height: 1.1em;
    color: #76220f;
    font-family: "Arial Black", sans-serif;
    font-size: 0.68rem;
    line-height: 1.2;
}

.plot-sold-toast {
    position: fixed;
    left: 50%;
    top: 86px;
    width: min(390px, calc(100vw - 30px));
    transform: translate(-50%, -22px) scale(0.92);
    z-index: 75;
    padding: 15px 16px 14px;
    border: 4px solid #fff7df;
    border-radius: 20px;
    background:
        radial-gradient(circle at 16% 10%, rgba(255,255,255,0.86), transparent 46%),
        linear-gradient(150deg, #dfff77 0%, #68d950 44%, #168a38 100%);
    color: #11370d;
    font-family: "Cooper Black", "Comic Sans MS", "Arial Black", sans-serif;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.7);
    box-shadow: 0 16px 36px rgba(0,0,0,0.34), inset 0 3px 0 rgba(255,255,255,0.72);
    pointer-events: none;
    animation: plotSoldToast 5200ms cubic-bezier(.2,.92,.24,1) forwards;
}

.plot-sold-title {
    display: block;
    font-size: 1.1rem;
    color: #fffbe8;
    text-shadow: 2px 2px 0 #0d6d22, 3px 4px 0 rgba(0,0,0,0.24);
}

.plot-sold-copy {
    display: block;
    margin-top: 6px;
    font-family: "Arial Black", sans-serif;
    font-size: 0.78rem;
    line-height: 1.22;
}

.money-transfer-bill {
    position: fixed;
    left: 50%;
    top: 132px;
    z-index: 76;
    width: 38px;
    height: 24px;
    border: 3px solid #155f20;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f2ffb8, #57d05b);
    color: #135416;
    font-family: "Arial Black", sans-serif;
    font-size: 0.86rem;
    box-shadow: 0 5px 0 rgba(0,0,0,0.18);
    pointer-events: none;
    animation: transferBill 1200ms cubic-bezier(.18,.92,.22,1) forwards;
}

@keyframes plotSoldToast {
    0% { opacity: 0; transform: translate(-50%, -22px) scale(0.92); }
    10% { opacity: 1; transform: translate(-50%, 0) scale(1.03); }
    16% { transform: translate(-50%, 0) scale(1); }
    86% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -18px) scale(0.96); }
}

@keyframes transferBill {
    0% { opacity: 0; transform: translate(-120px, 34px) rotate(-18deg) scale(0.72); }
    12% { opacity: 1; }
    58% { transform: translate(62px, -18px) rotate(14deg) scale(1.08); }
    100% { opacity: 0; transform: translate(158px, -72px) rotate(26deg) scale(0.55); }
}

#water-confirm-overlay {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(5,35,54,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 35;
}

#water-confirm-overlay.open { display: grid; animation: refillFadeIn 180ms ease; }

#water-confirm {
    width: min(380px, calc(100vw - 36px));
    padding: 22px 22px 18px;
    border: 4px solid #fffaf0;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff7d8, #ffd884);
    box-shadow: 0 18px 40px rgba(0,0,0,0.42), inset 0 3px 0 rgba(255,255,255,0.7);
    font-family: "Cooper Black", "Comic Sans MS", "Arial Black", sans-serif;
    color: #4a2c00;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.55);
    animation: refillPopIn 320ms cubic-bezier(0.34,1.56,0.64,1);
}

.confirm-title { font-size: 1.18rem; line-height: 1.15; }

.confirm-body { margin-top: 10px; font-size: 0.86rem; line-height: 1.35; }

.confirm-owner-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 3px;
    margin: 0 2px;
    background: rgba(255,255,255,0.6);
    border-radius: 999px;
    font-size: 0.78rem;
}

#confirm-owner-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #888;
    box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.confirm-dontask {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 0.78rem;
    cursor: pointer;
    user-select: none;
}

.confirm-dontask input { width: 16px; height: 16px; cursor: pointer; }

.confirm-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes dropFall {
    0% { opacity: 0; transform: translateY(-2px) scale(0.6); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(38px) scale(1); }
}

@keyframes refillDropFall {
    0% { transform: translateY(-20px) scale(0.9); }
    100% { transform: translateY(520px) scale(1.05); }
}

@keyframes harvestTagBounce {
    0%, 100% { transform: translate(-50%, -100%) translateY(0); }
    50% { transform: translate(-50%, -100%) translateY(-8px); }
}

@keyframes moneyBop {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    24% { transform: translateY(7px) rotate(-2deg) scale(0.95); }
    58% { transform: translateY(-9px) rotate(2.5deg) scale(1.08); }
    100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes noMoneyShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-7px); }
    50% { transform: translateX(7px); }
    75% { transform: translateX(-4px); }
}

@keyframes claimGlow {
    0% { filter: brightness(1); transform: scale(1); }
    45% { filter: brightness(1.2); transform: scale(1.06); }
    100% { filter: brightness(1); transform: scale(1); }
}

@keyframes amountRoll {
    0% { transform: translateY(0) scale(1); filter: blur(0); }
    36% { transform: translateY(8px) scale(0.92); filter: blur(1px); }
    72% { transform: translateY(-5px) scale(1.08); filter: blur(0); }
    100% { transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes seedPop {
    0% { transform: scale(1) rotate(0deg); }
    35% { transform: scale(1.2) rotate(-3deg); }
    68% { transform: scale(0.94) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes floatSpend {
    0% {
        opacity: 0;
        transform: translateY(14px) rotate(4deg) scale(0.86);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-52px) rotate(-7deg) scale(1.2);
    }
}

@keyframes claimPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -32%) scale(0.72);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -68%) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -115%) scale(0.92);
    }
}

@media (max-width: 520px) {
    #ui-layer {
        top: 58px;
        left: 12px;
        width: min(210px, calc(100vw - 158px));
    }
    #shop-timer {
        top: 10px;
        left: 12px;
        right: auto;
        transform: none;
        min-width: 132px;
        max-width: calc(100vw - 178px);
        padding: 8px 12px 9px;
        font-size: 0.62rem;
    }
    #money-counter {
        top: 12px;
        right: 12px;
        grid-template-columns: auto minmax(56px, auto);
        gap: 8px;
        min-width: 132px;
        padding: 8px 10px 9px 9px;
        border-radius: 14px;
        font-size: 1.22rem;
    }
    .cash-stack {
        width: 42px;
        height: 34px;
    }
    .cash-stack::before,
    .cash-stack::after,
    .cash-bill {
        width: 38px;
        height: 25px;
        border-width: 2px;
    }
    #money-amount {
        min-width: 48px;
        font-size: 1.5rem;
    }
    .cash-label {
        font-size: 0.54rem;
    }
    #live-status {
        bottom: -13px;
        font-size: 0.52rem;
    }
    #shop-panel {
        padding: 10px;
    }
    .shop-card {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas:
            "thumb copy"
            "button button";
        gap: 7px 8px;
        padding: 8px;
    }
    .seed-token.plant-thumb {
        display: grid;
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }
    .shop-title {
        font-size: 0.98rem;
    }
    .shop-item-name {
        font-size: 0.84rem;
    }
    .shop-item-meta {
        font-size: 0.55rem;
    }
    .buy-seed {
        padding: 10px 9px;
        font-size: 0.78rem;
    }
    .seed-catalog {
        margin-top: 8px;
        padding-top: 8px;
    }
    .catalog-list {
        max-height: 160px;
    }
    .catalog-title {
        font-size: 0.62rem;
    }
    .catalog-row {
        grid-template-columns: 1fr auto;
        gap: 7px;
        padding: 6px;
    }
    .catalog-icon {
        display: none;
    }
    .catalog-name,
    .catalog-owned {
        font-size: 0.62rem;
    }
}
