* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #efeae2; color: #303235; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.6; min-height: 100vh; }
a { color: #c2410c; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* Gate (login page) */
body.gate { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
body.gate main { max-width: 460px; width: 100%; background: #fff; border-radius: 16px; padding: 36px 28px; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
body.gate .avatar { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 16px; }
body.gate h1 { font-size: 22px; font-weight: 700; margin-bottom: 12px; color: #1f2937; }
body.gate p { color: #4b5563; margin-bottom: 16px; }
body.gate input { width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; margin-bottom: 12px; }
body.gate button { background: #c2410c; color: #fff; padding: 12px 24px; border: 0; border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; }
body.gate button:hover { background: #9a3412; }

/* App layout */
body.app { background: #efeae2; }
.app-header { background: #fff; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10; }
.app-header h1 { font-size: 17px; font-weight: 700; color: #1f2937; }
.app-header nav a { color: #4b5563; margin-left: 18px; font-size: 14px; font-weight: 500; }
.app-header nav a.active { color: #c2410c; }
.app-header nav a:hover { color: #c2410c; }

.app-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.hero { background: linear-gradient(135deg, #fff8f0 0%, #fef3c7 100%); border-radius: 20px; padding: 32px 28px; margin-bottom: 28px; text-align: center; }
.hero h2 { font-size: 28px; font-weight: 700; color: #1f2937; margin-bottom: 8px; }
.hero p { color: #4b5563; font-size: 15px; max-width: 540px; margin: 0 auto; }

.section-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #9a3412; margin: 32px 0 16px; }

/* Cards grid */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card { background: #fff; border-radius: 14px; padding: 22px 22px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.card h3 { font-size: 17px; font-weight: 700; color: #1f2937; margin-bottom: 10px; }
.card p { color: #4b5563; font-size: 14px; }
.card .meta { font-size: 12px; color: #9ca3af; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }

.card.icon-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 18px; }
.card.icon-card .icon { font-size: 36px; margin-bottom: 10px; }

/* Prayer page */
.prayer-list { display: flex; flex-direction: column; gap: 18px; }
.prayer { background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.prayer h3 { font-size: 18px; font-weight: 700; color: #c2410c; margin-bottom: 12px; }
.prayer .body { color: #1f2937; font-size: 15.5px; line-height: 1.7; white-space: pre-line; margin-bottom: 14px; }
.prayer .verses { font-size: 12.5px; color: #6b7280; font-style: italic; padding-top: 10px; border-top: 1px solid #f3f4f6; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-btn { background: #fff; border: 1px solid #e5e7eb; padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; color: #4b5563; transition: all 0.15s; }
.filter-btn.active { background: #c2410c; color: #fff; border-color: #c2410c; }
.filter-btn:hover { border-color: #c2410c; }

/* Image gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: pointer; transition: transform 0.2s; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.gallery img:hover { transform: scale(1.02); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 12px; }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,0.2); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; cursor: pointer; line-height: 0; }

/* Devotional */
.devotional { background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.devotional .date { color: #9a3412; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.devotional h2 { font-size: 24px; color: #1f2937; margin-bottom: 16px; }
.devotional .verse { font-style: italic; color: #4b5563; padding: 14px 18px; background: #fef3c7; border-left: 4px solid #c2410c; border-radius: 8px; margin: 16px 0 20px; }
.devotional .reflection { color: #1f2937; font-size: 15.5px; line-height: 1.75; white-space: pre-line; }

footer { text-align: center; padding: 40px 20px 20px; color: #9ca3af; font-size: 12.5px; }
