/* ---------------- Fonts ---------------- */
@import url('https://fonts.googleapis.com/css2?family=Comic+Relief:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

/* ---------------- Board Layout ---------------- */
.jokes-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* ---------------- Base Post-it ---------------- */
.postit {
    position: relative;
    width: 288px;aspect-ratio: 1 / 1;
    max-width: 288px;
    margin: 0 auto;
    font-size: 1rem;;
    box-shadow:
        0 5px 10px rgba(0,0,0,0.2),
        inset 0 -10px 20px rgba(0,0,0,0.05);
    border-radius: 3px;
    transform: rotate(-1deg);
    padding: 18px;
    box-sizing: border-box;
}

.postit > * {
    overflow-y: auto;
}

.postit > *::-webkit-scrollbar {
    width: 4px;
}

.postit > *::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* Slant variations */
.postit:nth-child(even) { transform: rotate(2deg); }
.postit:nth-child(3n) { transform: rotate(-2deg); }

/* Tape at the top */
.postit::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 60px;
    height: 20px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.1);
    z-index: 2; /* ensure it sits above flip card faces */
}

/* Push text down like handwriting */
.postit p {
    margin: 0;
    white-space: pre-wrap;
}

/* ---------------- Jokes ---------------- */
.postit--joke {
    background: #fff9a6;
    font-family: "Comic Relief", system-ui;
}

.postit--joke:nth-child(even) {
    background: #fff3a0;
}

/* ---------------- Word of the Day ---------------- */
.postit--word {
    background: #ffb6c1;
    justify-content: center;
    gap: 6px;
    font-family: "Source Sans 3", sans-serif;
}

.postit--word p {
    line-height: 1.35;
}

.postit--word em,
.postit--word span {
    font-weight: 400;
}

.postit--word strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 6px;
}

.postit--word:nth-child(even) {
    background: #ff9fb8;
}

.postit {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}


/* ---------------- Sudoku ---------------- */
.sudoku-board {
    display: inline-block;
    border-collapse: collapse;
    margin: 0 auto;
}

.sudoku-row {
    display: flex;
}

.sudoku-cell {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #999;
    font-weight: bold;
    font-size: 1rem;
    box-sizing: border-box;
    color: #222;
    text-shadow: 0 0 0.3px rgba(0,0,0,0.4);
    background: transparent;
}

.sudoku-row:nth-child(3n) .sudoku-cell {
    border-bottom: 3px solid #333; /* bottom of every 3rd row */
}

.sudoku-cell:nth-child(3n) {
    border-right: 3px solid #333; /* right edge of every 3rd column */
}

/* Optional: top and left edges */
.sudoku-row:first-child .sudoku-cell {
    border-top: 3px solid #333;
}
.sudoku-cell:first-child {
    border-left: 3px solid #333;
}
/* ---------------- Newspaper Style Container ---------------- */
.newspaper-sudoku {
    position: relative;
    display: inline-block;
    padding: 50px 6px 28px; /* top, sides, bottom */
    background: #f7f6f2;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);  /* subtle shadow */
    border-radius: 4px;
    transform: rotate(-0.8deg);
    margin: 20px auto;
}

/* Remove inner board borders so clip-path is visible */
.newspaper-sudoku .sudoku-board {
    border: none;
    background: transparent;
    margin: 0 4px; /* small horizontal margin so torn edges show */
    padding: 0;
}

/* ---------------- Pushpins ---------------- */
.pushpin {
    position: absolute;
    top: 10px;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
    border-radius: 50%;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.4);
    z-index: 5;
}

.pushpin::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 8px;
    width: 2px;
    height: 14px;
    background: #666;
}

.pushpin.left {
    left: 16px;
}

.pushpin.right {
    right: 16px;
}

.show-solution-btn {
    display: block;
    margin: 12px auto 0;
    padding: 6px 12px;
    font-size: 0.95rem;
    cursor: pointer;
    background: #ddd;
    border: 1px solid #999;
    border-radius: 3px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.show-solution-btn:hover {
    background: #ccc;
}

.yesterday-solution {
    display: none;
    margin-top: 12px;
}

.yesterday-solution.show {
    display: block;
}

@media print {

    /* Hide everything visually, but keep layout */
    body * {
        visibility: hidden;
    }

    /* Show ONLY the sudoku grid */
    .sudoku-board,
    .sudoku-board * {
        visibility: visible;
    }

    /* Remove all styling junk */
    .newspaper-sudoku {
        background: none !important;
        box-shadow: none !important;
        transform: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .pushpin,
    .print-btn,
    .show-solution-btn {
        display: none !important;
    }

    /* Center the puzzle on the page */
    .sudoku-board {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1.2);
    }

    /* Preserve grid layout */
    .sudoku-row {
        display: flex !important;
    }

    .sudoku-cell {
        background: white !important;
        box-shadow: none !important;
    }
}
