:root {
  color-scheme: light;
  --paper: #fffaf1;
  --ink: #242c26;
  --muted: #525d54;
  --green: #214c3b;
  --lime: #e3ed9c;
  --sage: #e4f2dc;
  --sky: #e4edf4;
  --lilac: #efe7fa;
  --white: #fffdf8;
  --stroke: #e3dccd;
  --heading: ui-rounded, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--heading); }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: #35634b; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #755294; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-200%); background: white; padding: .75rem; z-index: 2; }
.skip:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.masthead { border-bottom: 1px solid var(--stroke); background: var(--white); }
.mast-inner, .site-footer .wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; column-gap: .55rem; text-decoration: none; font-size: 1.125rem; font-weight: 800; white-space: nowrap; }
.brand-logo { display: block; width: clamp(118px, 12vw, 158px); height: auto; border-radius: 10px; flex: none; }
.brand-tagline { font-size: .74em; font-weight: 650; letter-spacing: 0; }
.top-nav { display: flex; gap: clamp(.25rem, 1.2vw, .75rem); }
.top-nav a { display:inline-flex; align-items:center; min-height:36px; padding:.3rem .7rem; border-radius:999px; text-decoration:none; color: var(--ink); font-size: .9375rem; font-weight: 650; white-space: nowrap; }
.top-nav a[aria-current] { color: var(--green); background:var(--sage); }
.spotlight { margin: 22px 0 16px; display: grid; grid-template-columns: max-content 1fr; align-items: center; background: #f4efd7; border: 1px solid #e9dfb8; border-radius: 16px; padding: 9px 14px; gap: 13px; }
.spot-title { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.spot-title span { color: #6a601e; font-size: 1.15rem; }
.spot-title h2 { margin: 0; font-size: .9375rem; }
.feature-list { min-width: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.feature { display: flex; gap: .5rem; align-items: center; background: var(--white); color: var(--ink); padding: .45rem .75rem; border-radius: 15px; text-decoration: none; min-height: 42px; font-size: .875rem; min-width: 0; }
.feature .badge { flex: 0 0 auto; white-space: nowrap; }
.feature span:nth-child(2) { overflow-wrap: anywhere; }
.feature time, .feature small { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.hero { position: relative; display: grid; grid-template-columns: 1fr .93fr; min-height: 362px; overflow: hidden; border: 1px solid #f0d9c7; border-radius: 26px; background: #fce9d8; }
.hero-copy { align-self: center; padding: clamp(24px, 4vw, 48px); z-index: 1; }
.hero img { height: 100%; width: 100%; min-height: 315px; object-fit: cover; object-position: center; }
.kicker { margin: 0 0 .3rem; font-weight: 750; color: var(--green); font-size: .875rem; letter-spacing: .06em; }
h1, h2, h3 { line-height: 1.25; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.1rem); margin: .3rem 0 .6rem; font-weight: 850; color: #243c2e; letter-spacing: .022em; }
.hero-description { margin: 0 0 1.15rem; color: #4e5a4e; font-weight: 560; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 5px; border: 1px solid #d3cbba; border-radius: 14px; gap: .4rem; background: var(--white); }
.search input { width: 100%; border: 0; padding: .6rem .75rem; background: transparent; }
.search button, .primary-link { min-height:44px; color: white; background: var(--green); border: 0; border-radius: 999px; padding: .55rem 1rem; font-weight: 700; text-decoration: none; }
.entry-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 18px 0 36px; }
.entry-point { min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid transparent; border-radius: 15px; text-decoration: none; color: var(--ink); }
.entry-point.activities { background: var(--sage); }
.entry-point.venues { background: var(--sky); }
.entry-point.deals { background: #fbe6d9; }
.entry-point.resources { background: var(--lilac); }
.entry-point[aria-current] { border-color: #a7aa91; }
.category-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: #fffaf0; font-size: 1.4rem; color: var(--green); }
.entry-point strong { display: block; font-size: 1.07rem; }
.entry-point small { display: block; font-size: .875rem; color: var(--muted); }
#browse { scroll-margin: 18px; }
.browse-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.browse-head h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin: 0; }
#result-count { margin: 0; color: var(--muted); font-weight: 650; white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: .7rem; align-items:end; margin:.9rem 0 1rem; padding:.65rem .75rem .75rem; background:color-mix(in srgb,var(--white),var(--paper) 45%); border:1px solid var(--stroke); border-radius:20px; }
.filters label { font-size: .875rem; font-weight: 690; display: grid; gap: .25rem; }
.filters select, #clear { min-height: 44px; min-width: 0; padding: .5rem .65rem; border: 1px solid #d3cbba; border-radius: 9px; background: var(--white); }
.filters select { appearance: none; padding-right: 1.9rem; background-image: linear-gradient(45deg,transparent 50%,var(--ink) 50%),linear-gradient(135deg,var(--ink) 50%,transparent 50%); background-position: calc(100% - 15px) center,calc(100% - 10px) center; background-size: 5px 5px; background-repeat: no-repeat; }
#clear { font-size: .875rem; padding-inline: .8rem; }
.more-filters { grid-column:1/-1; }
.more-filters summary, .access-detail summary { cursor:pointer; color:var(--green); padding:.25rem; }
.more-filters > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); gap:.55rem; margin-top:.45rem; }
.filters input { width:100%; min-height:44px; border:1px solid var(--stroke); border-radius:12px; padding:.5rem; background:var(--white); }
.guide-filters { grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); }
.guide-submit { min-height:44px; border-radius:999px; border:1px solid var(--stroke); background:var(--white); }
.guide-links { margin:0 0 1.5rem; }
.guide-links h2 { margin:0 0 .45rem; font-size:1.15rem; }
.guide-links ul { display:flex; flex-wrap:wrap; gap:.35rem; list-style:none; padding:0; margin:0; }
.guide-links a { display:inline-block; padding:.35rem .75rem; border:1px solid var(--stroke); border-radius:999px; background:var(--white); font-size:.9rem; text-decoration:none; }
.guide-links li:nth-child(1) a { background:#f9e0d8; color:#6a2c24; }
.guide-links li:nth-child(2) a { background:#e5eed8; color:#304d29; }
.guide-links li:nth-child(3) a { background:#f8ecd0; color:#634c17; }
.guide-links li:nth-child(4) a { background:#dfedf3; color:#254b60; }
.guide-links li:nth-child(5) a { background:#eee4f4; color:#513561; }
.guide-hot { display:inline-block; margin-inline-start:.35rem; padding:.04rem .35rem; border-radius:999px; background:#9d3528; color:#fff; font-size:.75rem; font-weight:800; }
.calendar-board { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.4rem; padding:0; list-style:none; }
.calendar-board > li,.calendar-list > li { padding:.55rem; border:1px solid var(--stroke); border-radius:14px; background:var(--white); overflow-wrap:anywhere; }
.calendar-board ul { padding-left:1em; font-size:.82rem; }
.calendar-list > li { margin:.4rem 0; }
.listings { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 0 0 40px; }
.listing { display: flex; flex-direction: column; min-width: 0; min-height: 220px; padding: 1rem; background: var(--white); border: 1px solid var(--stroke); border-radius: 15px; }
.badges, .area-links { display: flex; flex-wrap: wrap; gap: .38rem; }
.badge { color: var(--green); display: inline-flex; align-items: center; border-radius: 999px; padding: .12rem .55rem; font-size: .875rem; font-weight: 650; line-height: 1.55; }
.badge.category { background: var(--sage); }
.deals .badge.category { background: #fbe6d9; color: #76402a; }
.resources .badge.category { background: var(--lilac); color: #563c6b; }
.badge.upcoming { background: #f4edbf; color: #5b501b; }
.badge.ongoing { background: var(--sky); color: #264e60; }
.badge.ended, .badge.cancelled { background: #ece7e2; color: #584d4c; }
.badge.booking { background:#ffe4cb;color:#813811;font-weight:750; }
.badge.booking.suggested { background:#f5eedb;color:#605024; }
.activity-sessions { margin: .65rem 0; font-size: .875rem; }
.activity-sessions summary { cursor: pointer; font-weight: 700; }
.activity-sessions ul { padding-inline-start: 1.2rem; margin-block: .35rem; }
.activity-sessions li { margin-block: .45rem; overflow-wrap: anywhere; }
.activity-sessions li span { margin-inline-start: .25rem; }
.listing h3 { margin: .6rem 0 .38rem; font-size: 1.14rem; overflow-wrap: anywhere; }
.listing h3 a { color: var(--ink); text-decoration: none; }
.place, .note { color: var(--muted); font-size: .92rem; margin: .15rem 0; }
.place { font-weight: 680; }
.listing-end { display: flex; margin-top: auto; padding-top: .65rem; justify-content: space-between; gap: .35rem; color: var(--green); font-size: .875rem; font-weight: 680; }
.empty { margin-block: 1rem 2rem; padding: 1.1rem; background: var(--white); border-radius: 10px; }
.inner { padding-block: 28px 40px; min-height: 60vh; }
.inner h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 1rem 0; overflow-wrap: anywhere; }
.detail { max-width: 760px; background: var(--white); border: 1px solid var(--stroke); border-radius: 20px; padding: clamp(18px, 5vw, 42px); margin-top: 16px; }
.detail .intro { color: var(--muted); font-size: 1.1rem; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap:.5rem 1rem; padding:.8rem; border-radius:16px; background:var(--paper); }
.detail dt { font-weight: 750; }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.open-data-credit { margin-top: 1.5rem; color: var(--muted); font-size: .8125rem; }
.crumb { display: flex; gap: 1rem; }
.primary-link { display: inline-block; margin-top: 1rem; }
.site-footer { border-top: 1px solid var(--stroke); background: var(--white); color: var(--muted); }
.site-footer .wrap { padding: .65rem 0; }
.site-footer .brand-logo { width:116px; }
.site-footer .wrap > span { font-size: .875rem; }
@media (max-width: 780px) {
  .spotlight { grid-template-columns: 1fr; gap: .4rem; }
  .hero { grid-template-columns: 1fr .65fr; min-height: 325px; }
  .hero img { min-height: 0; }
  .listings { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .entry-point small { font-size: .8125rem; }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 28px); }
  .mast-inner { min-height:58px; gap:6px; padding-block:.45rem; }
  .wordmark { font-size: 1rem; }
  .top-nav { gap:.25rem; }
  .top-nav a { padding-inline:.55rem; font-size:.8125rem; }
  .spotlight { margin-top: 12px; padding: 9px; }
  .feature { width: 100%; }
  .feature time { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.55rem; }
  .hero-copy { padding: 22px 15px 16px; }
  .hero img { height: 150px; object-position: center 56%; }
  .entry-points { gap: 6px; margin: 12px 0 25px; }
  .entry-point { padding: .65rem .25rem; flex-direction: column; text-align: center; gap: .3rem; }
  .category-icon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; font-size: 1.08rem; }
  .entry-point strong { font-size: .875rem; }
  .entry-point small { display: none; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calendar-board { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .listings { grid-template-columns: 1fr; gap: 9px; }
  .listing { min-height: 0; }
  .site-footer .wrap { gap: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Monthly themes are selected in Taipei time. Festival styles load separately. */
[data-theme] { --control-radius:999px; --tile-radius:21px; --hero-radius:30px; --theme-tint:#fce9d8; --theme-accent:#e3ed9c; --shape:45%; background:var(--paper); }
[data-month="01"] { --paper:#f2f5fa; --green:#304967; --theme-tint:#e0ebf7; --theme-accent:#c8dceb; --tile-radius:22px; }
[data-month="02"] { --paper:#f9f1f6; --green:#604664; --theme-tint:#efdfed; --theme-accent:#e5c8dd; --tile-radius:24px 24px 18px 18px; }
[data-month="03"] { --paper:#f5f6e9; --green:#3c5a45; --theme-tint:#e5eddc; --theme-accent:#c7d9b0; --tile-radius:18px 26px; }
[data-month="04"] { --paper:#fcf3ed; --green:#784654; --theme-tint:#f8e0e3; --theme-accent:#f1c8d0; --tile-radius:25px; }
[data-month="05"] { --paper:#faf8e9; --green:#596034; --theme-tint:#f2edcc; --theme-accent:#e5d990; --tile-radius:19px 24px; }
[data-month="06"] { --paper:#edf7f5; --green:#295e59; --theme-tint:#d5ede6; --theme-accent:#b6dcd3; --tile-radius:23px 18px; }
[data-month="07"] { --paper:#eef5fa; --green:#265771; --theme-tint:#d6eaf6; --theme-accent:#bcdde9; --tile-radius:21px 26px; }
[data-month="08"] { --paper:#fef7e9; --green:#775031; --theme-tint:#f9e5bd; --theme-accent:#f2d294; --tile-radius:25px 20px; }
[data-month="09"] { --paper:#fbf3eb; --green:#62493b; --theme-tint:#f0e0cf; --theme-accent:#e6c9a5; --tile-radius:19px 23px; }
[data-month="10"] { --paper:#fff4e7; --green:#73462f; --theme-tint:#f5dbc4; --theme-accent:#ecc4a0; --tile-radius:22px 18px; }
[data-month="11"] { --paper:#f7f4ec; --green:#5c5844; --theme-tint:#eee7d6; --theme-accent:#dfd0b3; --tile-radius:24px 21px; }
[data-month="12"] { --paper:#f3f6f7; --green:#355466; --theme-tint:#dee9ef; --theme-accent:#c5dbe0; --tile-radius:24px; }
[data-theme] .hero { background:var(--theme-tint); border-radius:var(--hero-radius); }
[data-theme] .hero h1 { color:var(--green); }
.hero-region { font-size:.875rem; color:var(--muted); }
[data-theme] :is(.search button,.filters select,#clear,.primary-link,#weather-city,.top-nav a) { border-radius:var(--control-radius); }
[data-theme] :is(.entry-point,.listing,.detail,.weather,.spotlight) { border-radius:var(--tile-radius); }
[data-theme] .category-icon { border-radius:var(--shape); font-family:var(--heading); }
.theme-art { position:relative; min-width:0; min-height:0; }
.theme-art img { display:block; }
[data-month] :is(.masthead,.site-footer) { background:color-mix(in srgb,var(--white),var(--theme-accent) 24%); }
[data-month] .spotlight { background:color-mix(in srgb,var(--white),var(--theme-accent) 38%); }
[data-month] .listing { border-top:3px solid var(--theme-accent); }
[data-month] .theme-art img[src$="outing.jpg"] { filter:saturate(.87); }
[data-school] .entry-point.deals { background:#884d4e; color:#fff8ef; box-shadow:0 4px 12px #54303423; }
[data-school] .entry-point.deals small { color:#fff1df; }
[data-school]:not([data-festival]) :is(.spotlight,.hero) { border-color:#ddb99c; }
[data-school]:not([data-festival]) .hero { background:linear-gradient(125deg,#fae4d0,#f4e7d9); }
[data-school] .hero h1 { font-size:clamp(2.15rem,4.4vw,3.55rem); }
.weather { display:grid;grid-template-areas:"controls source" "days days";grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.25rem .85rem;margin:-10px 0 22px;padding:.35rem .8rem .5rem;background:var(--white);border:1px solid var(--stroke);font-size:.875rem; }
.weather-top { grid-area:controls;display:flex;gap:.65rem;align-items:center; }
.weather-top h2 { margin:0;font-size:1rem;color:var(--green); }
.weather-summary { grid-area:days;min-width:0;overflow:hidden;margin:0; }
.weather-track, .weather-set, .weather-segment { display:flex;align-items:center;width:max-content; }
.weather-track { animation:weather-loop 42s linear infinite; }
.weather-track.local { animation:none; }
.weather-summary:has(.weather-track.local) { overflow-x:auto; }
.weather-summary:is(:hover,:focus-within) .weather-track { animation-play-state:paused; }
.weather-set, .weather-segment { gap:.8rem;padding-inline-end:.8rem; }
.weather-segment { border-inline-end:1px solid var(--stroke); }
.weather-segment b { color:var(--green); }
.weather-days { display:flex;gap:.85rem;list-style:none;padding:0;margin:0; }
.weather-days li { display:flex;align-items:baseline;gap:.35rem;white-space:nowrap; }
.weather-days :is(time,strong) { white-space:nowrap;font-weight:750; }
.weather-days span { color:var(--muted); }
.weather-icon { font-size:1rem; }
.weather-notices { padding:.45rem .8rem; margin:-.75rem 0 1.15rem; border-inline-start:3px solid #a35445; background:var(--white); }
.weather-notices p { margin:.15rem 0; font-size:.875rem; }
#weather-source { grid-area:source;justify-self:end;font-size:.8125rem; }
@keyframes weather-loop { to { transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) {
  .weather-summary { overflow-x:auto; }
  .weather-track { animation:none; }
  .weather-copy { display:none; }
}
@media (min-width:850px) {
  .weather { grid-template-areas:"controls days source";grid-template-columns:auto minmax(0,1fr) auto;padding-block:.35rem; }
}
@media (max-width:580px) {
  .weather { margin-top:0; }
}

@media (hover: hover) and (pointer: fine) {
  .top-nav a:hover { color: var(--green); background: var(--sage); }
  .entry-point:hover { border-color: #a7aa91; }
  .feature:hover { background: white; color: var(--green); }
  .search button:hover, .primary-link:hover { background: #326748; color: white; }
  #clear:hover { background: var(--sage); }
  .guide-links a:hover { text-decoration:underline; }
  .listing:hover { border-color: #bbb7a4; }
  .listing h3 a:hover { text-decoration: underline; }
}
