
/* Reset & Base */
:root {
    --primary: #0066cc;
    --primary-hover: #004c99;
    --secondary: #e6f2ff;
    --text-main: #222;
    --text-muted: #666;
    --border: #ddd;
    --bg-page: #f9f9f9;
    --bg-card: #fff;
    --success: #28a745;
    --warning: #ffc107;
    --spacing: 12px;
    --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
html, body { overflow-x: hidden; width: 100%; }
body { background: var(--bg-page); color: var(--text-main); line-height: 1.5; padding-bottom: 60px; }
img, svg { max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Utilities */
.text-center { text-align: center; }
.mb-40 { margin-bottom: 40px; }
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.mt-40 { margin-top: 40px; }
.mt-20 { margin-top: 20px; }
.mt-16 { margin-top: 16px; }
.p-40 { padding-top: 40px; padding-bottom: 40px; }
.p-24 { padding-top: 24px; }
.max-w-800 { max-width: 800px; margin: 0 auto; padding-left: 12px; padding-right: 12px; }
.max-w-500 { max-width: 500px; margin: 0 auto; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.bg-white { background: #fff; }
.border-b { border-bottom: 1px solid var(--border); }
.py-12 { padding: 12px 0; }
.sticky-top { position: sticky; top: 0; z-index: 100; }
.main-title { font-size: 2.5rem; font-weight: 800; letter-spacing: -1px; color: var(--text-main); }
.page-title { margin: 24px 0 16px; font-size: 2rem; font-weight: 800; }
.page-title-simple { margin: 24px 0; font-size: 2rem; font-weight: 800; }
.font-bold { font-weight: 700; }
.color-primary { color: var(--primary); }
.color-text-main { color: var(--text-main); }
.text-decoration-none { text-decoration: none; }
.inline-block { display: inline-block; }
.cta-box { background: var(--secondary); padding: 24px; border-radius: 8px; border: 1px solid #cce5ff; }
.cta-desc { margin-bottom: 16px; color: #444; }
.report-btn { background: none; border: none; color: #666; font-size: 0.8rem; text-decoration: underline; cursor: pointer; }

/* Layout */
.container { max-width: 800px; margin: 0 auto; padding: 0 var(--spacing); }
header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: var(--spacing) 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text-main); letter-spacing: -0.5px; }
.logo span { color: var(--primary); }
.nav-link { font-weight: 600; font-size: 0.9rem; color: var(--text-main); text-decoration: none; }

footer { background: #fff; padding: 2rem 0; margin-top: 2rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.footer-links { margin-top: 8px; }
.footer-link { color: inherit; text-decoration: none; }

/* Components */
.search-box { display: flex; gap: 8px; margin: 20px 0; }
.search-input { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; }
.search-btn { background: var(--primary); color: #fff; border: none; padding: 0 20px; border-radius: var(--radius); font-weight: 600; cursor: pointer; }

.section-title { font-size: 0.85rem; font-weight: 700; margin: 24px 0 12px; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; }

/* Categories Grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.category-card { background: var(--bg-card); border: 1px solid var(--border); padding: 16px; border-radius: var(--radius); text-align: center; transition: background 0.1s; display: block; text-decoration: none; color: inherit; }
.category-card:hover { background: var(--secondary); border-color: var(--primary); }
.category-icon { font-size: 2rem; display: block; margin-bottom: 8px; display: flex; justify-content: center; }
.category-name { font-weight: 600; font-size: 0.95rem; display: block; overflow-wrap: break-word; word-wrap: break-word; }
.category-detail-text { font-weight: 700; color: var(--primary); }
.category-subtext { font-size: 0.8rem; color: var(--text-muted); }
.category-card.text-left { text-align: left; }

/* List Links */
.list-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.list-link { display: block; padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; color: var(--primary); text-decoration: none; }
.list-link:hover { text-decoration: underline; background: var(--secondary); }

/* Place Card */
.place-card { background: var(--bg-card); border: 1px solid var(--border); padding: 16px; margin-bottom: 12px; border-radius: var(--radius); position: relative; }
.place-card.sponsored { border: 1px solid var(--primary); background: #f0f7ff; }
.sponsored-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; display: block; }

.place-name { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; display: block; text-decoration: none; }
.place-address { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.place-meta { display: flex; gap: 12px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.tag { background: #eee; padding: 2px 6px; border-radius: 4px; }
.tag.open { color: var(--success); background: #e6ffed; }

.place-actions { display: flex; gap: 8px; }
.place-actions.max-w-400 { margin-top: 16px; max-width: 400px; }
.btn { flex: 1; text-align: center; padding: 8px 16px; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; text-decoration: none; display: inline-block; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--primary); color: #fff; border: none; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text-main); }
.btn-website { background: #f0f0f0; color: var(--text-main); }
.btn.flex-initial { flex: initial; }
.btn.flex-2 { flex: 2; }

/* Detail Page */
.detail-header { background: var(--bg-card); padding: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; border: 1px solid var(--border); border-radius: 4px; }
.detail-name { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.detail-info-grid { display: grid; gap: 16px; background: var(--bg-card); padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); grid-template-columns: 1fr; }
.info-row { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.info-val { font-size: 1rem; }
.info-link { color: var(--primary); font-size: 0.9rem; margin-top: 4px; text-decoration: none; }
.hours-grid { display: grid; grid-template-columns: 100px 1fr; gap: 4px; font-size: 0.95rem; }
.hours-grid .day { font-weight: 500; color: var(--text-main); }
.hours-grid .time { color: var(--text-muted); }

/* Sticky Mobile Bar */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 12px;
    display: flex; /* Always flex, hidden by media query on desktop */
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 200;
}
.mobile-sticky-bar .btn { padding: 12px; font-size: 1rem; }

/* Filters */
.filters-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 12px; }
.filter-input { padding: 6px 12px; border: 1px solid var(--border); border-radius: 16px; font-size: 0.85rem; outline: none; }
.chip { white-space: nowrap; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--border); background: #fff; font-size: 0.85rem; cursor: pointer; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); margin: 12px 0; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs span { margin: 0 6px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.page-link { padding: 8px 12px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); text-decoration: none; color: var(--primary); }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.modal-title { font-weight: 700; font-size: 1.25rem; margin-bottom: 12px; }
.modal-body { margin-bottom: 20px; color: var(--text-muted); font-size: 0.95rem; }
.modal-select { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 12px; }
.modal-textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; height: 80px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* Disabled Buttons */
.btn.disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #ccc !important;
    color: #666 !important;
    border-color: #ccc !important;
}

@media (min-width: 600px) {
    .mobile-sticky-bar { display: none !important; }
    body { padding-bottom: 0; }
    .place-actions .btn { flex: initial; padding: 8px 16px; }
    .detail-info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 599px) {
    body { padding-bottom: 70px; }
}
