/* Pantry Dinner Spin Wheel – Custom Styles */
:root {
    --color-bg: #FDFBF7;
    --color-surface: #FFFFFF;
    --color-primary: #C7512E;
    --color-primary-hover: #A84323;
    --color-secondary: #4A6B5D;
    --color-text: #2E2A26;
    --color-text-light: #6B625A;
    --color-border: #E6DFD3;
    --color-accent: #F3A738;
    --color-favorite: #D4A373;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.25rem;
}
.logo svg {
    color: var(--color-primary);
}
.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.nav-list a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}
.nav-list a:hover,
.nav-list a.active {
    border-bottom-color: var(--color-primary);
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}
.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--color-text);
    max-width: 700px;
    margin: 0 auto 0.75rem;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Section */
.tool-section {
    padding: 1rem 0 3rem;
}
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.ingredient-panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}
.ingredient-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.panel-desc {
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.input-row input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-bg);
    transition: border-color 0.2s;
}
.input-row input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(199,81,46,0.15);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
    white-space: nowrap;
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}
.btn-primary:hover {
    background: var(--color-primary-hover);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-text {
    background: transparent;
    color: var(--color-text-light);
    padding: 0.4rem 0;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-text:hover {
    color: var(--color-text);
}
.ingredient-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.5rem;
    margin-bottom: 0.75rem;
}
.ingredient-chips li {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ingredient-chips button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--color-text-light);
    padding: 0;
    display: flex;
}
.ingredient-chips button:hover {
    color: var(--color-primary);
}
.count-hint {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

/* Wheel Panel */
.wheel-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
}
#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: transform 0.1s ease-out;
}
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}
.btn-spin {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 14px rgba(199,81,46,0.4);
    border: 3px solid #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn-spin:hover:not(:disabled) {
    background: var(--color-primary-hover);
}
.btn-spin:disabled {
    background: #ccc;
    box-shadow: none;
    border-color: #eee;
    cursor: not-allowed;
}
.result-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.result-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.result-card p {
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}
.prep-notes {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: left;
}
.result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-secondary {
    background: var(--color-secondary);
    color: #fff;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}
.btn-secondary:hover {
    background: #3D5A4E;
}
.btn-favorite {
    background: var(--color-favorite);
    color: #fff;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}
.btn-favorite:hover {
    background: #C4935F;
}

/* Favorites */
.favorites-section {
    padding: 2rem 0 3rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.favorites-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.section-desc {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}
.favorites-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.favorites-grid li {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--color-border);
}
.favorites-grid h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
.favorites-grid p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}
.empty-state {
    color: var(--color-text-light);
    font-style: italic;
}

/* Info & Tips */
.info-section {
    padding: 3rem 0;
}
.info-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}
.step-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.step-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.tips-section {
    padding: 2rem 0 3rem;
}
.tips-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.tips-list {
    list-style: disc;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: var(--color-text-light);
}

/* Footer */
.site-footer {
    margin-top: auto;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.25rem 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
}
.footer-nav {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}
.footer-nav a {
    text-decoration: none;
    color: var(--color-text-light);
}
.footer-nav a:hover {
    color: var(--color-text);
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
    .wheel-container {
        width: 280px;
        height: 280px;
    }
    #wheel-canvas {
        width: 280px;
        height: 280px;
    }
    .btn-spin {
        width: 70px;
        height: 70px;
        font-size: 1rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .header-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ingredient-panel {
        padding: 1.25rem;
    }
    .input-row {
        flex-direction: column;
    }
    .btn-primary {
        width: 100%;
    }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
