/* css/styles.css — theme, layout helpers, playful animations */

* {
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    min-height: 100%;
}

body {
    background: linear-gradient(180deg,
            #cdeeff 0%,
            #e7f6ff 22%,
            #f3fbea 46%,
            #dff3c4 78%,
            #c6eb9c 100%) fixed;
    background-attachment: fixed;
}

/* ---------------------------------------------------------------- Background */

.meadow-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.meadow-cloud {
    position: absolute;
    display: block;
    width: 140px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    filter: blur(0.4px);
    box-shadow:
        40px -16px 0 6px rgba(255, 255, 255, 0.9),
        78px 2px 0 -2px rgba(255, 255, 255, 0.85);
    opacity: 0.85;
    animation: drift 34s linear infinite;
}

.cloud-1 {
    top: 8%;
    left: -10%;
    animation-duration: 44s;
}

.cloud-2 {
    top: 20%;
    left: 30%;
    transform: scale(0.7);
    animation-duration: 60s;
    animation-delay: -12s;
    opacity: 0.7;
}

.cloud-3 {
    top: 4%;
    left: 65%;
    transform: scale(1.1);
    animation-duration: 52s;
    animation-delay: -26s;
    opacity: 0.6;
}

.meadow-hill {
    position: absolute;
    bottom: 0;
    display: block;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hill-1 {
    left: -12%;
    width: 78%;
    height: 220px;
    background: radial-gradient(ellipse at 50% 0%, #a7dc6b 0%, #8fd155 70%);
    opacity: 0.55;
}

.hill-2 {
    right: -14%;
    width: 72%;
    height: 180px;
    background: radial-gradient(ellipse at 50% 0%, #b6e57f 0%, #9ada62 70%);
    opacity: 0.45;
}

@keyframes drift {
    from {
        transform: translateX(-20vw);
    }

    to {
        transform: translateX(120vw);
    }
}

/* ------------------------------------------------------------------- Cards */

.toy-card {
    background: rgba(255, 255, 255, 0.86);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 6px 0 rgba(120, 170, 70, 0.16),
        0 20px 34px -22px rgba(40, 80, 20, 0.4);
    backdrop-filter: blur(6px);
}

.rounded-4xl {
    border-radius: 2rem;
}

/* ----------------------------------------------------------------- Buttons */

.toy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1.1;
    border: 2px solid transparent;
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.12),
        0 10px 16px -12px rgba(0, 0, 0, 0.4);
    transition:
        transform 0.08s ease,
        box-shadow 0.08s ease,
        filter 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.toy-btn:hover {
    filter: brightness(1.04);
}

.toy-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.toy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.toy-btn-green {
    background: linear-gradient(#a5e06a, #7bbf2e);
    color: #1c3308;
}

.toy-btn-sky {
    background: linear-gradient(#bfe9ff, #7cc9f5);
    color: #08324a;
}

.toy-btn-rose {
    background: linear-gradient(#ffc9dc, #ff93b7);
    color: #5a0f2a;
}

.toy-btn-amber {
    background: linear-gradient(#ffe6a8, #ffc94d);
    color: #4a2f02;
}

.toy-btn-plain {
    background: #ffffff;
    color: #334155;
    border-color: #e2e8f0;
}

/* ------------------------------------------------------------------- Chips */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    border: 2px solid rgba(0, 0, 0, 0.06);
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    transition:
        transform 0.08s ease,
        background 0.12s ease;
}

.chip:hover {
    transform: translateY(-1px);
}

.chip-on {
    background: #cdeca6;
    border-color: #95d24c;
    color: #22460a;
}

.vol-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.55rem 0.25rem 0.25rem;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #e8f0dc;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

.vol-chip-remove {
    border: none;
    background: transparent;
    color: #b91c1c;
    font-weight: 900;
    cursor: pointer;
    padding: 0 0.15rem;
    line-height: 1;
}

/* -------------------------------------------------------------- Drop zones */

.drop-zone {
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

.drop-zone.drag-over {
    background: #eafbd4;
    box-shadow: inset 0 0 0 3px #95d24c;
    transform: scale(1.01);
}

.draggable {
    cursor: grab;
}

.draggable:active {
    cursor: grabbing;
}

.dragging {
    opacity: 0.45;
}

/* --------------------------------------------------------------- Roulette */

.reel-window {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(#fffdf6, #f4fbe6);
    border: 2px dashed #b6e57f;
}

.reel-text {
    animation: reelblur 0.12s linear infinite;
    filter: blur(0.6px);
    font-weight: 800;
}

@keyframes reelblur {
    0% {
        transform: translateY(-16%);
        opacity: 0.55;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(16%);
        opacity: 0.55;
    }
}

.cell-revealed {
    animation: bouncin 0.5s ease-out;
}

.cell-pending {
    opacity: 0.5;
}

.roulette-cell {
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.roulette-cell.is-active {
    box-shadow:
        0 0 0 4px #ffd166,
        0 18px 30px -18px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px) scale(1.02);
    z-index: 2;
}

/* ------------------------------------------------------------------- Table */

.ocg-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.ocg-table th,
.ocg-table td {
    border-bottom: 2px solid #eef4e3;
    padding: 0.6rem 0.7rem;
    vertical-align: middle;
}

.ocg-table thead th {
    position: sticky;
    top: 0;
    background: #f6fbe9;
    z-index: 1;
    font-family: 'Fredoka', sans-serif;
}

.ocg-table tbody tr:hover td {
    background: #fbfef5;
}

.ocg-table .role-col {
    position: sticky;
    left: 0;
    background: #f6fbe9;
    z-index: 1;
    font-weight: 800;
}

/* ------------------------------------------------------------------- Toast */

.toast-enter-active,
.toast-leave-active {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.toast-enter-from,
.toast-leave-to {
    opacity: 0;
    transform: translate(-50%, 14px);
}

/* --------------------------------------------------------------- Scrollbar */

* {
    scrollbar-width: thin;
    scrollbar-color: #b6e57f #eef7e0;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    background: #b6e57f;
    border-radius: 999px;
    border: 2px solid #eef7e0;
}

*::-webkit-scrollbar-track {
    background: #eef7e0;
}

/* ------------------------------------------------------- Role icon picker */

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 12px;
    border: 2px solid #e8f0dc;
    background: #f6fbe9;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.08s ease,
        box-shadow 0.12s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
}

.icon-btn-on {
    border-color: #95d24c;
    box-shadow: 0 0 0 3px rgba(149, 210, 76, 0.35);
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 1rem;
    background: #f6fbe9;
    max-height: 176px;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .icon-picker {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }
}

.icon-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 2px solid transparent;
    background: #fff;
    font-size: 1.05rem;
    cursor: pointer;
    transition:
        transform 0.08s ease,
        background 0.12s ease;
}

.icon-choice:hover {
    transform: translateY(-1px);
    background: #eafbd4;
}

.icon-choice-on {
    background: #cdeca6;
    border-color: #95d24c;
}

/* ------------------------------------------------------ Extra chip flavors */

.chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.chip-touch {
    background: #e7f6ff;
    color: #08324a;
    border-color: #bfe9ff;
}

.chip-suggest {
    background: #fff3d6;
    color: #4a2f02;
    border-color: #ffd166;
}

.chip-danger {
    background: #ffe4ec;
    color: #7a1236;
    border-color: #ffc9dc;
}

.chip-danger:hover:not(:disabled) {
    background: #ffd0e0;
}

/* ---------------------------------------------------- Inline pick (select) */

.cell-select {
    max-width: 100%;
    border-radius: 0.75rem;
    border: 2px solid #95d24c;
    background: #fff;
    padding: 0.3rem 0.4rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    outline: none;
}

/* ----------------------------------------------------------- Mobile cards */

.week-card {
    border-radius: 1.25rem;
    border: 2px solid #e4f6ce;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

/* ------------------------------------------------------ Mobile adjustments */

@media (max-width: 639px) {
    .rounded-4xl {
        border-radius: 1.25rem;
    }

    .toy-btn {
        padding: 0.55rem 0.7rem;
        font-size: 0.78rem;
    }

    .ocg-table th,
    .ocg-table td {
        padding: 0.35rem 0.4rem;
        font-size: 0.68rem;
    }

    .ocg-table .role-col {
        max-width: 108px;
        white-space: normal;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .icon-choice {
        font-size: 1.2rem;
    }

    .chip {
        min-height: 34px;
        padding: 0.35rem 0.7rem;
    }
}

body {
    overflow-x: hidden;
}

input,
select,
textarea,
button {
    font-family: inherit;
}

/* ------------------------------------------------------------ Print / PNG */

.export-surface {
    background: linear-gradient(180deg, #ffffff 0%, #f6fbe9 100%);
}

@media print {
    .no-print {
        display: none !important;
    }
}