@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root { --ink:#17201d; --paper:#fbfaf7; --mist:#f2f0ea; --accent:#e85d3f; --line:#e3e0d8; --muted:#65716b; --card:#fff; }
* { box-sizing: border-box; }
body { margin:0; background:var(--paper) !important; color:var(--ink) !important; font-family:'DM Sans',Arial,sans-serif !important; }
h1,h2,h3 { color:var(--ink); font-family:'Fraunces',Georgia,serif; letter-spacing:-.035em; }
a { color:inherit; }

/* Shared header */
.header { min-height:70px; display:flex; align-items:center; gap:22px; padding:13px clamp(16px,4vw,56px) !important; background:rgba(251,250,247,.96) !important; border-bottom:1px solid var(--line); box-shadow:none !important; }
.logo { display:flex; align-items:center; color:var(--ink) !important; font:700 1.35rem/1 'Fraunces',Georgia,serif !important; letter-spacing:-.045em; }
.logo::before { content:'E'; display:grid; width:32px; height:32px; margin-right:8px; place-items:center; border-radius:50%; background:var(--accent); color:#fff; font:700 .85rem 'DM Sans',sans-serif; letter-spacing:0; }
.logo-toggle-row { display:flex; align-items:center; }
#dark-mode-toggle { display:none !important; }
.mobile-nav-toggle { display:none !important; }
.header nav { display:flex; align-items:center; gap:4px; margin-left:auto; }
.header nav a { margin:0 !important; padding:8px 10px; border-radius:999px; color:var(--ink) !important; font-size:.86rem; font-weight:700; text-decoration:none; white-space:nowrap; }
.header nav a:hover { background:var(--mist); color:var(--accent) !important; }
.search-bar input { width:min(100%,320px) !important; min-height:38px; }

/* Keep the desktop header in one compact row. The legacy stylesheet contains
   several old header rules, so these intentionally use stronger overrides. */
@media (min-width:761px) {
  .header { display:flex !important; flex-direction:row !important; flex-wrap:nowrap !important; justify-content:space-between !important; align-items:center !important; min-height:70px !important; height:auto !important; }
  .header .logo-toggle-row { flex:0 0 auto !important; width:auto !important; margin:0 !important; }
  .header .search-bar { display:block !important; order:initial !important; flex:1 1 280px !important; width:auto !important; max-width:360px !important; margin:0 18px !important; }
  .header .search-bar form { display:block !important; width:100% !important; margin:0 !important; }
  .header .search-bar input { width:100% !important; margin:0 !important; }
  .header nav { display:flex !important; order:initial !important; flex:0 0 auto !important; width:auto !important; margin:0 !important; padding:0 !important; }
}

/* Forms, buttons and messages */
input,select,textarea { min-height:42px; border:1px solid var(--line) !important; border-radius:11px !important; background:#fff !important; color:var(--ink) !important; font:inherit !important; }
input:focus,select:focus,textarea:focus { outline:3px solid rgba(232,93,63,.16); border-color:var(--accent) !important; }
button,.btn,.search-btn,.sign-in { border:0 !important; border-radius:999px !important; background:var(--ink) !important; color:#fff !important; font:700 .86rem 'DM Sans',sans-serif !important; text-decoration:none !important; transition:transform .18s ease,background .18s ease; }
button:hover,.btn:hover,.search-btn:hover,.sign-in:hover { background:var(--accent) !important; color:#fff !important; transform:translateY(-1px); }
.btn.create,.btn.explore { background:var(--accent) !important; }
.host-section h1,.host-section p { color:#fff !important; }
.flash-messages { width:min(1120px,calc(100% - 32px)); margin:16px auto; }
.flash-message { padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fff5d8; color:var(--ink); }

/* Discovery pages */
.hero { height:min(590px,67vh) !important; min-height:440px; background:var(--ink); }
.hero::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(18,25,22,.78),rgba(18,25,22,.30),rgba(18,25,22,.06)); pointer-events:none; }
.overlay-text { z-index:1; width:min(700px,calc(100% - 44px)); left:clamp(22px,9vw,130px) !important; transform:translateY(-50%) !important; text-align:left !important; color:#fff; font:700 clamp(2.5rem,4.4vw,4.7rem)/1.02 'Fraunces',Georgia,serif !important; letter-spacing:-.055em; text-shadow:none !important; }
.overlay-text::before { content:'YOUR CITY, WIDE OPEN'; display:block; margin-bottom:16px; color:#fff; font:700 .7rem 'DM Sans',sans-serif; letter-spacing:.16em; }
.btn-container { position:relative; z-index:2; width:min(1120px,calc(100% - 32px)); margin:-73px auto 0 !important; text-align:left !important; }
.btn-container .btn { margin-right:9px; padding:11px 17px !important; }
.search-filters { width:min(1120px,calc(100% - 32px)); margin:32px auto 0 !important; padding:0 !important; background:transparent !important; }
.search-filters form { display:flex; flex-wrap:wrap; gap:8px; padding:12px; border:1px solid var(--line); border-radius:17px; background:#fff; box-shadow:0 14px 34px rgba(23,32,29,.08); }
.search-filters input,.search-filters select { flex:1 1 160px; min-width:0; }
.categories,.events-section,.featured-section,.upcoming-events,.trending-events { width:min(1120px,calc(100% - 32px)); margin-left:auto; margin-right:auto; background:transparent !important; }
.categories { padding:50px 0 18px !important; text-align:left !important; }
.categories h2,.events-section h2,.featured-section h2 { font-size:clamp(1.8rem,3vw,2.45rem); }
.category-list,.tabs,.filters { display:flex; gap:8px; overflow-x:auto; padding:5px 0 11px; }
.category,.tab,.filter { flex:0 0 auto; border:1px solid var(--line) !important; border-radius:999px !important; background:#fff !important; color:var(--ink) !important; font-weight:700; text-decoration:none !important; }
.category.active,.category:hover,.tab.active,.tab:hover,.filter.active,.filter:hover { background:var(--ink) !important; border-color:var(--ink) !important; color:#fff !important; }

/* Cards and content panels */
.event,.featured-event,.place-card,.event-card,.card { overflow:hidden; border:1px solid var(--line) !important; border-radius:16px !important; background:var(--card) !important; box-shadow:none !important; }
.event:hover,.featured-event:hover,.place-card:hover,.event-card:hover { transform:translateY(-3px); box-shadow:0 16px 32px rgba(23,32,29,.1) !important; }
.event-row { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px !important; margin-bottom:18px !important; }
.event { display:flex !important; flex-direction:column !important; width:100% !important; min-width:0; }
.event img { display:block !important; width:100% !important; height:205px !important; min-height:0 !important; margin:0 !important; border:0 !important; border-radius:0 !important; object-fit:cover !important; object-position:center !important; }
.event .info { width:100% !important; padding:15px !important; }
.featured-event img,.place-card img { display:block; width:100%; object-fit:cover; object-position:center; }
.place-cover { aspect-ratio:16/9; height:auto !important; }
.place-hero { display:block; width:100%; max-height:480px; object-fit:cover; object-position:center; }
.places-page { width:min(1100px,calc(100% - 32px)); min-height:0 !important; margin:30px auto 46px; padding:0; background:transparent !important; }
.places-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.places-category-nav { display:flex; gap:8px; margin:16px 0; overflow-x:auto; padding:2px 1px 7px; scrollbar-width:none; }
.places-category-nav::-webkit-scrollbar { display:none; }
.places-category-nav a { flex:0 0 auto; padding:8px 11px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); font-size:.78rem; font-weight:700; text-decoration:none; white-space:nowrap; }
.places-category-nav a:hover,.places-category-nav a.active { border-color:var(--ink); background:var(--ink); color:#fff; }
.places-toolbar { display:grid; grid-template-columns:1.4fr 1.2fr .9fr .9fr auto; gap:9px; margin-top:18px; padding:12px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.places-toolbar input,.places-toolbar select { min-width:0; }
.places-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.place-body { padding:13px; }
.place-type { color:var(--accent); font:700 .62rem 'DM Sans',sans-serif; letter-spacing:.1em; text-transform:uppercase; }
.place-name { margin:5px 0; font:700 1rem/1.18 'Fraunces',Georgia,serif; }
.place-name a { text-decoration:none; }
.place-location { overflow:hidden; color:var(--muted); font-size:.78rem; text-overflow:ellipsis; white-space:nowrap; }
.gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.gallery img { width:100%; aspect-ratio:1/1; border-radius:10px; object-fit:cover; }
.event-card-image { background-position:center !important; background-size:cover !important; }
.event h3,.featured-event h3,.event-card h3 { font-size:1.14rem; }
.event h3 a,.featured-event h3 a,.event-card h3 a { color:var(--ink) !important; text-decoration:none; }
.event .category { display:inline-flex; }
.event-details,.event-info,.event-content { padding:15px !important; }
.events-section { padding:28px 0 38px !important; }
.load-more { display:flex; justify-content:center; margin:24px 0 4px; }
.load-more .load-more-btn { display:inline-flex; align-items:center; gap:8px; margin:0 !important; padding:11px 18px !important; text-decoration:none; }
.section-heading { margin:0 0 13px; }
.section-heading span { display:block; color:var(--accent); font:700 .62rem 'DM Sans',sans-serif; letter-spacing:.14em; }
.section-heading h2 { margin:2px 0 0; font-size:clamp(1.45rem,3vw,2rem); }
.discovery-band { width:100vw; margin:32px 0 17px calc(50% - 50vw); padding:25px max(16px,calc((100vw - 1120px)/2)); background:var(--mist); }
.discovery-band span { display:block; color:var(--accent); font:700 .62rem 'DM Sans',sans-serif; letter-spacing:.14em; }
.discovery-band h2 { margin:2px 0 0; font-size:clamp(1.4rem,3vw,1.9rem); }
.discovery-band-things { background:#fff; }
.near-location-form { display:flex; gap:8px; max-width:510px; margin-top:11px; }
.near-location-form input { min-width:0; flex:1; padding:9px 11px; border:1px solid var(--line); border-radius:9px; font:inherit; }
.near-location-form button { border:0; border-radius:9px; padding:9px 11px; background:var(--ink); color:#fff; font:700 .76rem 'DM Sans',sans-serif; cursor:pointer; white-space:nowrap; }
.near-location-form #use-my-location { background:var(--accent); }
.events-section > h2,.featured-section > h2 { position:relative; padding-top:13px; margin-bottom:16px; }
.events-section > h2::before,.featured-section > h2::before { content:'CURATED FOR TODAY'; position:absolute; top:0; left:0; color:var(--accent); font:700 .62rem 'DM Sans',sans-serif; letter-spacing:.14em; }
.featured-section { padding:34px 0 42px !important; }
.featured-section > h2::before { content:'LOCAL FAVOURITES'; }
.featured-list { display:flex !important; gap:14px !important; overflow-x:auto; padding:2px 1px 12px; scrollbar-width:none; }
.featured-list::-webkit-scrollbar { display:none; }
.featured-event { flex:0 0 min(260px,72vw); }
.featured-event img { height:142px; }
.featured-event > div { padding:12px !important; }
.featured-event h3 { margin:0 0 5px; font-size:1rem; }
.featured-event span { display:block; margin-top:3px; color:var(--muted); font-size:.76rem; }
.happening-featured-list,.nearby-featured-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 18px; }
.happening-featured-list .happening-row,.nearby-featured-list .nearby-row { display:contents !important; }
.happening-featured-list .event,.nearby-featured-list .event { min-width:0; }
.happening-featured-list .event img,.nearby-featured-list .event img { height:138px !important; }
.happening-featured-list .event .info,.nearby-featured-list .event .info { padding:11px !important; }
.happening-featured-list .event h3,.nearby-featured-list .event h3 { margin:0 0 4px; font-size:.92rem; line-height:1.16; }
.happening-featured-list .event .category,.nearby-featured-list .event .category { margin-bottom:4px; padding:0 !important; border:0 !important; background:transparent !important; color:var(--accent) !important; font-size:.6rem; letter-spacing:.08em; }
.happening-featured-list .event .date,.happening-featured-list .event .location,.happening-featured-list .event .school,.nearby-featured-list .event .date,.nearby-featured-list .event .location,.nearby-featured-list .event .school { overflow:hidden; color:var(--muted); font-size:.68rem; text-overflow:ellipsis; white-space:nowrap; }
.happening-featured-list .event .countdown,.happening-featured-list .event .price,.happening-featured-list .event .actions,.nearby-featured-list .event .countdown,.nearby-featured-list .event .price,.nearby-featured-list .event .actions { display:none !important; }
body > div[style*="max-width"],.form-container,.auth-container,.profile-container,.place-detail { border:1px solid var(--line) !important; border-radius:18px !important; box-shadow:0 14px 34px rgba(23,32,29,.08) !important; }
.login-card { width:min(100% - 32px,440px); margin:48px auto; padding:34px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 14px 34px rgba(23,32,29,.08); }
.login-card h1 { margin:3px 0 9px; text-align:left; font-size:2.2rem; }
.login-eyebrow { margin:0; color:var(--accent); font-size:.7rem; font-weight:700; letter-spacing:.13em; }
.login-help { margin:0 0 20px; color:var(--muted); line-height:1.5; }
.login-card label { display:block; margin-bottom:6px; font-size:.88rem; font-weight:700; }
.login-card input { width:100%; margin:0 0 14px; padding:11px 12px; }
.login-card .sign-in { width:100%; min-height:44px; }
.auth-divider { display:flex; align-items:center; gap:10px; margin:18px 0; color:var(--muted); font-size:.78rem; text-align:center; }
.auth-divider::before,.auth-divider::after { content:''; flex:1; height:1px; background:var(--line); }
.google-auth-button { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:44px; padding:10px 14px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); font-size:.88rem; font-weight:700; text-decoration:none; transition:border-color .18s ease,background .18s ease; }
.google-auth-button:hover { border-color:#b8b4aa; background:var(--mist); color:var(--ink); }
.google-mark { display:grid; width:21px; height:21px; place-items:center; border-radius:50%; background:conic-gradient(from -45deg,#4285f4 0 25%,#34a853 0 50%,#fbbc05 0 75%,#ea4335 0); color:#fff; font:bold .72rem Arial,sans-serif; }
.form-container .google-auth-button { margin:16px auto 0; }
.saved-events-page { width:min(100% - 32px,960px); min-height:calc(100vh - 180px); margin:30px auto 50px; display:flex; align-items:center; justify-content:center; }
.saved-events-card { width:100%; padding:30px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 14px 34px rgba(23,32,29,.08); }
.saved-events-card > h1 { margin:0 0 22px; text-align:center; font-size:clamp(1.7rem,4vw,2.35rem); }
.saved-events-card > .btn { display:table; margin:22px auto 0; padding:11px 20px; }
.saved-events-empty { max-width:480px; margin:0 auto; padding:30px 20px; border:1px dashed var(--line); border-radius:14px; text-align:center; background:var(--mist); }
.saved-events-empty p { margin:0; font-size:1.08rem; }
.saved-events-empty .saved-events-empty-help { margin-top:7px; color:var(--muted); font-size:.9rem; }
.place-form-page { width:min(100% - 32px,820px); margin:32px auto 50px; }
.place-form-card { padding:clamp(20px,4vw,36px); border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 14px 34px rgba(23,32,29,.08); }
.place-form-card h1 { margin:3px 0 8px; font-size:clamp(2rem,5vw,2.65rem); }
.place-form-eyebrow { margin:0; color:var(--accent); font-size:.7rem; font-weight:700; letter-spacing:.14em; }
.place-form-intro { margin:0 0 25px; color:var(--muted); }
.place-form .form-group { margin:0 0 16px; }
.place-form label,.place-form legend { display:block; margin-bottom:6px; color:var(--ink); font-size:.86rem; font-weight:700; }
.place-form input,.place-form select,.place-form textarea { width:100%; padding:11px 12px; }
.place-form textarea { resize:vertical; }
.place-form-grid,.place-upload-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.place-location-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:4px 0 18px; padding:16px; border:1px solid var(--line); border-radius:13px; }
.place-location-grid legend { padding:0 5px; }
.place-location-grid .place-address-field { grid-column:1 / -1; }
.place-form small { display:block; margin-top:5px; color:var(--muted); font-size:.76rem; }
.place-form-actions { display:flex; justify-content:flex-end; align-items:center; gap:14px; margin-top:22px; }
.place-form-actions .btn { padding:11px 20px; }
.place-cancel { color:var(--muted); font-weight:700; text-decoration:none; }
.place-cancel:hover { color:var(--ink); }
.profile-page { width:min(100% - 32px,1080px); margin:30px auto 50px; }
.profile-top-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); gap:18px; margin-bottom:18px; }
.profile-page .stats-card { margin:0; padding:24px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 14px 34px rgba(23,32,29,.08); }
.profile-page .profile-header { margin-bottom:18px; }
.profile-page .profile-info h1,.profile-page .stats-card h2 { color:var(--ink); font-family:'Fraunces',Georgia,serif; }
.profile-page .stats-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.profile-page .stat-box { padding:15px 10px; border:1px solid var(--line); border-radius:12px; background:var(--mist); }
.profile-page .stat-number { color:var(--ink); font:700 1.6rem 'Fraunces',Georgia,serif; }
.profile-page .event-tabs { display:flex; gap:8px; overflow-x:auto; margin:16px 0; padding-bottom:4px; }
.profile-page .event-tab { flex:0 0 auto; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); }
.profile-page .event-tab.active { border-color:var(--ink); background:var(--ink); color:#fff; }
.profile-page .event-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.profile-page .event-card { height:100%; }
.profile-page .event-card-actions { display:flex; flex-wrap:wrap; gap:7px; }
.profile-page .empty-state { padding:28px 16px; border:1px dashed var(--line); border-radius:14px; background:var(--mist); text-align:center; }
@media (max-width:760px) { .profile-page { width:calc(100% - 28px); margin:20px auto 34px; } .profile-top-grid,.profile-page .event-list { grid-template-columns:1fr; } .profile-page .stats-card { padding:17px; } }
@media (max-width:600px) { .place-form-page { width:calc(100% - 28px); margin:20px auto 34px; } .place-form-card { padding:18px; } .place-form-grid,.place-upload-grid,.place-location-grid { grid-template-columns:1fr; gap:0; } .place-location-grid .place-address-field { grid-column:auto; } }
table { border:1px solid var(--line); border-radius:13px; border-collapse:separate; border-spacing:0; overflow:hidden; background:#fff; }
th { background:var(--mist); color:var(--ink); } th,td { padding:11px; border-bottom:1px solid var(--line); }
.footer { margin-top:56px; background:var(--ink) !important; color:#fff !important; }
.footer a { color:#fff !important; }
.footer .subscribe-form { display:grid; grid-template-columns:minmax(0, 1fr) 50px; gap:0; width:100%; max-width:430px; }
.footer .subscribe-form input[type="email"] { box-sizing:border-box; width:100% !important; min-width:0; min-height:48px; margin:0; padding:0 14px; border-radius:12px 0 0 12px !important; }
.footer .subscribe-form .subscribe-btn { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:50px !important; min-height:48px; margin:0; padding:0 !important; border:0; border-radius:0 12px 12px 0 !important; background:var(--brand) !important; color:#fff !important; font-size:1.25rem; line-height:1; cursor:pointer; }
.footer .subscribe-form .subscribe-btn:hover,.footer .subscribe-form .subscribe-btn:focus-visible { background:var(--brand-dark, #064a85) !important; outline:2px solid #fff; outline-offset:2px; }
.resource-page { width:min(1040px, calc(100% - 40px)); margin:64px auto; }
.resource-kicker { margin:0 0 10px; color:var(--brand); font-weight:800; letter-spacing:.08em; text-transform:uppercase; font-size:.76rem; }
.resource-page h1 { margin:0; color:var(--ink); font-size:clamp(2rem, 5vw, 3.4rem); }
.resource-intro { max-width:700px; margin:16px 0 34px; color:var(--muted); font-size:1.08rem; line-height:1.7; }
.resource-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; }
.resource-card { padding:24px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 8px 22px rgba(13, 36, 31, .06); }
.resource-card h2 { margin:0 0 10px; color:var(--ink); font-size:1.08rem; }
.resource-card p,.resource-contact { margin:0; color:var(--muted); line-height:1.65; }
.resource-contact { margin-top:32px; }
.resource-contact a { color:var(--brand); font-weight:700; }
.resource-footer { margin-top:0 !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Home discovery panel */
.discovery-search { width:min(1180px,calc(100% - 32px)); margin:32px auto 24px; padding:0; border-radius:0; background:transparent; color:var(--ink); box-shadow:none; }
.discovery-search .search-filters { width:100%; margin:0; padding:0; background:transparent !important; }
.discovery-search .search-filters form { position:relative; display:flex; align-items:center; gap:12px; min-width:0; padding:10px 11px 10px 53px; border:1px solid #c8e0dc; border-radius:24px; background:#fff; box-shadow:0 8px 20px rgba(0,78,70,.08); }
.discovery-search .search-filters form > input:not(#event-search),.discovery-search .search-filters form > select { display:none; }
.discovery-search .search-icon { position:absolute; left:27px; color:#758397; font-size:1.06rem; pointer-events:none; }
.discovery-search #event-search { flex:1 1 auto; min-width:0; min-height:54px; padding:8px 4px; border:0 !important; border-radius:13px !important; box-shadow:none; font-size:1.05rem !important; }
.discovery-search #event-search:focus { outline:0; box-shadow:none; }
.discovery-search .search-btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:54px; padding:0 28px !important; border-radius:17px !important; background:#00685f !important; font-size:1.05rem !important; }
.discovery-search .search-btn:hover { background:#00534c !important; }
.discovery-search .categories { width:100%; margin:0; padding:27px 0 0 !important; text-align:center !important; }
.discovery-search .categories h2,.discovery-search .categories p { display:none; }
.discovery-search .category-list { justify-content:center; gap:12px; overflow-x:auto; padding:3px 1px 8px; scrollbar-width:none; }
.discovery-search .category-list::-webkit-scrollbar { display:none; }
.discovery-search .category { display:flex; flex:0 0 102px; min-height:104px; align-items:center; justify-content:center; flex-direction:column; gap:9px; padding:10px 7px !important; border:1px solid #c8e0dc !important; border-radius:24px !important; background:#e8f4f1 !important; color:#075f57 !important; font-size:.87rem; line-height:1.1; }
.discovery-search .category i { display:grid; width:47px; height:47px; place-items:center; border-radius:16px; background:#e85d3f; color:#fff; font-size:1.2rem; }
.discovery-search .category span { display:block; font-weight:700; }
.discovery-search .category.active,.discovery-search .category:hover { border-color:#00685f !important; background:#d5ebe7 !important; color:#00564f !important; transform:translateY(-2px); }

@media (max-width:760px) {
  html,body { width:100%; max-width:100%; overflow-x:clip; }
  .header { position:sticky !important; top:0; z-index:1000; display:grid !important; grid-template-columns:1fr !important; gap:8px; padding:12px 16px 10px !important; box-shadow:0 5px 18px rgba(23,32,29,.08) !important; }
  .header .logo-toggle-row { width:100%; justify-content:space-between; }
  .header .logo { font-size:1.22rem !important; }
  .header .logo::before { width:28px; height:28px; margin-right:7px; }
  /* Search is available in the filters below the hero. Removing the duplicate
     field gives phones a calm, compact header. */
  .header .search-bar { display:none !important; }
  .mobile-nav-toggle { display:inline-flex !important; align-items:center; justify-content:center; width:38px; height:38px; margin-left:auto; border:1px solid var(--line) !important; border-radius:10px !important; background:#fff !important; color:var(--ink) !important; font-size:1.2rem !important; cursor:pointer; }
  .header nav { display:none !important; flex-wrap:wrap; width:100%; margin:0 !important; justify-content:center; overflow:visible !important; padding:5px 0 4px !important; }
  .header nav.mobile-nav-open { display:flex !important; max-height:calc(100vh - 70px); overflow-y:auto; }
  .header nav a { font-size:.7rem !important; padding:7px 8px !important; }
  .footer { margin-top:34px !important; padding:28px 16px 18px !important; }
  .footer .section { display:grid !important; grid-template-columns:1fr 1fr; gap:24px 18px; width:100%; margin:0 !important; text-align:left; }
  .footer .section > div { width:auto !important; min-width:0; margin:0 !important; }
  .footer .section > div:first-child,.footer .section > div:last-child { grid-column:1 / -1; }
  .footer h3 { margin:0 0 8px !important; font-size:1rem !important; }
  .footer p { margin:0 0 9px !important; font-size:.8rem !important; line-height:1.5; }
  .footer a { display:block !important; width:max-content; max-width:100%; margin:0 0 8px !important; font-size:.8rem !important; text-decoration:none; }
  .footer .social-icons { display:flex; flex-wrap:wrap; gap:10px; }
  .footer .social-icons a { margin:0 !important; }
  .footer input[type="email"] { width:calc(100% - 52px) !important; min-height:42px; border-radius:9px 0 0 9px !important; }
  .footer .subscribe-btn { width:48px; min-height:42px; padding:0 !important; border-radius:0 9px 9px 0 !important; }
  .footer .bottom { display:block !important; margin-top:24px !important; padding-top:16px; border-top:1px solid rgba(255,255,255,.18); text-align:left; }
  .footer .bottom > div { display:flex; flex-wrap:wrap; gap:8px 14px; }
  .footer .bottom a { display:inline-block !important; width:auto; margin:0 !important; font-size:.73rem !important; }
  .resource-page { width:calc(100% - 32px); margin:38px auto; }
  .resource-grid { grid-template-columns:1fr; }
  .hero { height:320px !important; min-height:320px; }
  .overlay-text { top:52% !important; width:calc(100% - 36px); left:18px !important; font-size:clamp(2.15rem,10vw,3rem) !important; }
  .overlay-text::before { margin-bottom:12px; font-size:.62rem; }
  .btn-container { display:flex; gap:8px; margin-top:-24px !important; }
  .btn-container .btn { flex:1; margin:0; padding:11px 7px !important; font-size:.77rem !important; }
  /* Search controls stay compact: keyword search gets a full row and the
     remaining refinements are paired below it. */
  .search-filters { margin-top:24px !important; }
  .search-filters form { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; padding:10px !important; }
  .search-filters input,.search-filters select,.search-filters .search-btn { width:100% !important; min-width:0 !important; margin:0 !important; font-size:.77rem !important; }
  .search-filters input[name="search"] { grid-column:1 / -1; }
  .search-filters .search-btn { min-height:38px; padding:8px 5px !important; text-align:center; }
  .categories,.events-section,.featured-section,.upcoming-events,.trending-events { width:calc(100% - 32px); }
  .categories { padding-top:34px !important; }
  .categories h2 { margin:0 0 3px !important; font-size:1.35rem !important; }
  .categories > p { margin:0 0 8px !important; color:var(--muted); font-size:.77rem; }
  .category-list { gap:7px !important; padding:4px 1px 10px !important; scroll-snap-type:x proximity; }
  .category-list .category { flex:0 0 auto; scroll-snap-align:start; padding:7px 10px !important; font-size:.7rem !important; }
  /* The upcoming/past/trending and date filters are intentionally horizontal
     chip rows so they remain one tap wide rather than becoming a tall grid. */
  .tabs,.filters { flex-wrap:nowrap !important; gap:7px !important; margin:0 -1px 9px !important; padding:3px 1px 9px !important; overflow-x:auto !important; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .tabs::-webkit-scrollbar,.filters::-webkit-scrollbar { display:none; }
  .tabs .tab,.filters .filter { flex:0 0 auto !important; padding:7px 10px !important; font-size:.7rem !important; line-height:1.15; white-space:nowrap; }
  /* Places listing and its filters use the same small-screen rhythm as the
     event discovery page. */
  .places-header { align-items:flex-start; flex-direction:column; gap:9px; margin-bottom:14px; }
  .places-page { width:calc(100% - 28px) !important; min-height:0 !important; margin:20px auto 34px !important; padding:0 !important; display:block !important; background:transparent !important; }
  .places-header h1 { font-size:1.55rem !important; line-height:1.1; }
  .places-header .btn { margin:0 !important; }
  .places-category-nav { gap:7px; margin:0 0 13px; padding:2px 1px 8px; -webkit-overflow-scrolling:touch; }
  .places-category-nav a { padding:7px 10px; font-size:.69rem; }
  .places-toolbar { grid-template-columns:1fr 1fr; gap:8px; margin-top:0; padding:10px; border-radius:13px; }
  .places-toolbar input,.places-toolbar select,.places-toolbar .btn { width:100% !important; min-width:0; margin:0 !important; font-size:.76rem !important; }
  .places-toolbar input[name="search"] { grid-column:1 / -1; }
  .places-toolbar .btn { min-height:38px; padding:8px 5px !important; }
  /* Places need more room than a tiny product tile. Each listing becomes a
     clear image-and-details row on phones. */
  .places-grid { grid-template-columns:1fr; gap:12px; }
  .place-card { display:grid !important; grid-template-columns:128px minmax(0,1fr); min-width:0; border-radius:12px !important; }
  .place-card > a { display:block; min-width:0; }
  .place-cover { display:block; width:100% !important; height:132px !important; aspect-ratio:auto; border-radius:0 !important; }
  .place-body { min-width:0; padding:12px !important; }
  .place-name { display:-webkit-box; overflow:hidden; margin:5px 0; font-size:.94rem; line-height:1.16; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .place-type { font-size:.58rem; }
  .place-location { font-size:.7rem; }
  .place-card .rating { display:flex; gap:3px; align-items:center; overflow:hidden; font-size:.72rem; white-space:nowrap; }
  .place-detail { width:calc(100% - 28px) !important; margin:16px auto !important; padding:0 0 17px !important; border:0 !important; box-shadow:none !important; }
  .place-detail > :not(.place-hero) { margin-left:0; margin-right:0; }
  .place-detail h1 { font-size:1.7rem !important; line-height:1.08; }
  .place-hero { max-height:270px; border-radius:14px; }
  .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .discovery-band { margin:28px 0 13px; padding:0; background:transparent !important; }
  .near-location-form { display:grid; grid-template-columns:1fr; gap:10px; width:100%; max-width:none; }
  .near-location-form input { grid-column:auto; min-height:44px; }
  .near-location-form button { width:100%; min-height:44px; padding:10px 12px; font-size:.8rem; }
  .event-row { display:grid !important; grid-template-columns:1fr !important; gap:13px !important; }
  .event { display:flex !important; flex-direction:column !important; width:100% !important; min-width:0; }
  .event img { width:100% !important; height:175px !important; min-height:0; }
  .event .info { min-width:0; padding:12px !important; }
  .event h3 { overflow-wrap:anywhere; }
  .event .category { margin-bottom:5px; padding:3px 6px !important; border:0 !important; background:transparent !important; color:var(--accent) !important; font-size:.59rem !important; letter-spacing:.08em; }
  .event h3 { margin:0 0 4px; font-size:.92rem !important; line-height:1.15; }
  .event .date,.event .location,.event .school { overflow:hidden; color:var(--muted) !important; font-size:.66rem !important; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
  .event .countdown,.event .price,.event .actions { display:none !important; }
  .featured-list { display:flex !important; grid-template-columns:none !important; gap:10px !important; }
  .featured-event { flex:0 0 calc((100vw - 52px) / 3); min-width:125px; border-radius:10px !important; }
  .featured-event img { height:88px; }
  .featured-event > div { padding:8px !important; }
  .featured-event h3 { overflow:hidden; margin:0 0 3px; font-size:.68rem !important; line-height:1.16; text-overflow:ellipsis; white-space:nowrap; }
  .featured-event span { overflow:hidden; font-size:.56rem; text-overflow:ellipsis; white-space:nowrap; }
  .featured-event .btn,.featured-event .countdown,.featured-event .button-group,.featured-event .social-share { display:none !important; }
  /* Trending is a collection on phones, not a desktop carousel.  A two-column
     grid keeps the images, titles and dates comfortably readable. */
  #trending-events .slider-controls { display:none !important; }
  #trending-events .trending-slider { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:11px !important; overflow:visible !important; padding:0 !important; transform:none !important; }
  #trending-events .featured-event { display:flex !important; width:100% !important; min-width:0 !important; border-radius:11px !important; }
  #trending-events .featured-event img { height:118px !important; }
  #trending-events .featured-event > div { padding:9px !important; }
  #trending-events .featured-event h3 { display:-webkit-box; overflow:hidden; margin:0 0 4px; font-size:.78rem !important; line-height:1.18; text-overflow:clip; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  #trending-events .featured-event span { overflow:hidden; font-size:.61rem !important; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
  /* Show all four cards in an easy-to-scan two-column grid instead of
     squeezing three tiny cards into a scrolling strip. */
  .happening-featured-list,.nearby-featured-list { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:11px; margin:0 0 18px; padding:0; overflow:visible; }
  .happening-featured-list .event,.nearby-featured-list .event { display:flex !important; width:100% !important; min-width:0; border-radius:11px !important; }
  .happening-featured-list .event img,.nearby-featured-list .event img { height:112px !important; }
  .happening-featured-list .event .info,.nearby-featured-list .event .info { padding:9px !important; }
  .happening-featured-list .event h3,.nearby-featured-list .event h3 { display:-webkit-box; overflow:hidden; font-size:.76rem !important; line-height:1.18; text-overflow:clip; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .happening-featured-list .event .date,.happening-featured-list .event .location,.happening-featured-list .event .school,.nearby-featured-list .event .date,.nearby-featured-list .event .location,.nearby-featured-list .event .school { font-size:.59rem !important; }
  body > div[style*="max-width"],.form-container,.auth-container,.profile-container,.place-detail { width:calc(100% - 28px) !important; margin-left:auto !important; margin-right:auto !important; padding:17px !important; }
  table { display:block; max-width:100%; overflow-x:auto; white-space:nowrap; }
  .discovery-search { width:calc(100% - 24px); margin:22px auto; padding:13px 12px 18px; border-radius:20px; overflow:visible; }
  .discovery-search .search-filters { margin:0 !important; }
  .discovery-search .search-filters form { display:flex !important; grid-template-columns:none !important; gap:6px !important; padding:7px 7px 7px 42px !important; border-radius:17px; }
  .discovery-search .search-icon { left:21px; font-size:.88rem; }
  .discovery-search #event-search { width:auto !important; min-height:45px; padding:6px 2px; font-size:.82rem !important; }
  .discovery-search .search-btn { flex:0 0 auto; width:auto !important; min-height:45px; padding:0 13px !important; border-radius:13px !important; font-size:.82rem !important; white-space:nowrap; }
  .discovery-search .category-list { display:flex !important; flex-wrap:nowrap !important; justify-content:flex-start; gap:8px !important; width:100%; margin:0; padding:3px 2px 10px !important; overflow-x:auto !important; overflow-y:hidden; scroll-padding-left:2px; scroll-snap-type:x mandatory; touch-action:pan-x; -webkit-overflow-scrolling:touch; }
  .discovery-search .category { flex:0 0 84px !important; min-height:88px; gap:6px; padding:7px 4px !important; border-radius:19px !important; font-size:.68rem !important; scroll-snap-align:start; }
  .discovery-search .category i { width:38px; height:38px; border-radius:13px; font-size:1rem; }
}
