:root {
    --bg: #fff7ed;
    --fg: #1f2937;
    --primary: #f59e0b;
    --primary-fg: #1f2937;
    --tile-bg: #ffffff;
    --tile-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    --error: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
}

header.jp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--primary);
    color: var(--primary-fg);
}

header.jp-header h1 { margin: 0; font-size: 1.25rem; }
.jp-points { font-size: 1.25rem; font-weight: 600; }

main.jp-main { padding: 1.25rem; max-width: 960px; margin: 0 auto; }

.jp-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.jp-tile {
    background: var(--tile-bg);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--tile-shadow);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.jp-tile:hover {
    filter: brightness(1.04);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(31, 41, 55, .16);
}
.jp-tile:active { transform: scale(0.97); }
.jp-tile-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.jp-tile-name { font-weight: 600; }

.jp-login {
    max-width: 320px;
    margin: 4rem auto;
    text-align: center;
}
.jp-login h1 { margin-bottom: 1.5rem; }
.jp-pin-display {
    font-size: 2rem;
    letter-spacing: 0.6rem;
    margin: 1rem 0;
    min-height: 2.5rem;
}
.jp-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}
.jp-pin-pad button {
    font-size: 1.5rem;
    padding: 1rem;
    border: 0;
    border-radius: 12px;
    background: var(--tile-bg);
    box-shadow: var(--tile-shadow);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.jp-pin-pad button:hover {
    background: #fff7ed;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(31, 41, 55, .16);
}
.jp-pin-pad button:active { transform: scale(0.96); }
.jp-error { color: var(--error); margin-top: 1rem; min-height: 1.25rem; }
.jp-logout {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: underline;
}

.jp-daily-banner {
    max-width: 960px;
    margin: 0.75rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #fff8d6;
    border: 1px solid #ead27a;
    color: #5a4500;
    font-weight: 500;
    text-align: center;
}

.jp-daily-banner--capped {
    background: #ffd9d9;
    border-color: #e08a8a;
    color: #6b1a1a;
}

@media (prefers-reduced-motion: reduce) {
    .jp-tile,
    .jp-pin-pad button {
        transition: none;
    }

    .jp-tile:hover,
    .jp-pin-pad button:hover {
        transform: none;
    }
}
