:root{
  --cream:#FBF6EC; --sky:#F6DDBB; --ink:#2B2118; --muted:#6B5A4B; --muted2:#5A4A3C;
  --red:#B23A2B; --red-dark:#7A2A1E; --sage:#3E5A38; --sage-tint:#E6ECDF; --sage-light:#D9E4D2;
  --mustard:#F5B94A; --mustard-tint:#F8E5B9; --line:#EADFCC; --line2:#E3D6C1; --stamp:#C9B79E; --white:#FFFFFF;
  --serif:Fraunces, Georgia, serif; --sans:"Nunito Sans", system-ui, -apple-system, Segoe UI, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--cream);color:var(--ink);font-family:var(--sans);-webkit-text-size-adjust:100%}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
img{max-width:100%;display:block}
.app{max-width:560px;margin:0 auto;min-height:100vh;padding-bottom:calc(84px + env(safe-area-inset-bottom));position:relative}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:focus-visible{outline:3px solid var(--mustard);outline-offset:2px}

/* hero */
.hero{position:relative;height:200px;background:var(--sky);overflow:hidden}
.hero-art{position:absolute;inset:0;width:100%;height:100%}
.hero-top{position:relative;display:flex;justify-content:space-between;align-items:flex-start;padding:22px 20px 0}
.brand{display:flex;flex-direction:column;gap:2px}
.brand-kicker{font-size:12px;font-weight:800;letter-spacing:.14em;color:var(--red-dark)}
.brand-name{font-family:var(--serif);font-weight:800;font-size:30px;line-height:1}
.greeting{position:relative;margin:10px 20px 0;font-family:var(--serif);font-style:italic;font-weight:500;font-size:19px;color:#4A3424}
.icon-btn{width:44px;height:44px;border-radius:22px;background:var(--cream);display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;flex:none}

.view{padding:4px 20px 20px;display:flex;flex-direction:column;gap:18px;outline:none}
h1.page{margin:0;font-family:var(--serif);font-weight:800;font-size:26px;line-height:1.1}
h2.sec{margin:0;font-family:var(--serif);font-weight:800;font-size:20px}
.sub{font-size:14px;color:var(--muted);margin-top:4px}
.row{display:flex;align-items:center;gap:12px}
.between{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.link{font-size:14px;font-weight:700;color:var(--sage)}

/* chips */
.chips{display:flex;gap:8px;overflow-x:auto;margin:0 -20px;padding:2px 20px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--line2);background:var(--white);font-weight:600;font-size:14px;cursor:pointer}
.chip[aria-pressed="true"]{background:var(--sage);border-color:var(--sage);color:#fff;font-weight:700}

/* segmented */
.seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border-radius:14px;background:#F1E7D6}
.seg button{min-height:40px;border-radius:10px;border:none;background:transparent;font-weight:600;font-size:14px;color:var(--muted2);cursor:pointer}
.seg button[aria-pressed="true"]{background:#fff;color:var(--sage);font-weight:800;box-shadow:0 1px 3px rgba(74,52,36,.15)}

/* cards */
.list{display:flex;flex-direction:column;gap:10px}
.day-head{font-size:13px;font-weight:800;letter-spacing:.1em;color:var(--sage);margin:6px 0 -2px}
.card{display:flex;gap:10px;align-items:center;padding:12px;border-radius:14px;background:#fff;border:1px solid var(--line)}
.card-main{display:flex;gap:14px;align-items:center;flex:1;min-width:0}
.stamp{width:54px;height:58px;flex:none;border-radius:8px;border:2px dashed var(--stamp);background:var(--cream);display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--red)}
.stamp b{font-size:11px;font-weight:800;letter-spacing:.06em}
.stamp span{font-family:var(--serif);font-size:21px;font-weight:800;line-height:1.05;color:var(--ink)}
.card-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.card-title{font-size:15px;font-weight:800;line-height:1.25}
.card-meta{font-size:13px;color:var(--muted)}
.card-tag{font-size:12px;font-weight:700;color:var(--sage)}
.cal-btn{width:44px;height:44px;flex:none;border-radius:12px;border:1px solid var(--stamp);background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.cal-btn svg{width:20px;height:20px;fill:none;stroke:var(--sage);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.cal-btn.on{background:var(--sage);border-color:var(--sage)}
.cal-btn.on svg{stroke:#fff}

/* featured flyer */
.flyer{position:relative;margin:6px 4px 4px;border-radius:6px;background:#fff;box-shadow:0 8px 20px rgba(74,52,36,.16);transform:rotate(-1deg)}
.flyer::before{content:"";position:absolute;top:-10px;left:50%;margin-left:-30px;width:60px;height:20px;background:rgba(227,167,47,.55);transform:rotate(3deg)}
.flyer-art{height:128px;margin:12px 12px 0;border-radius:4px;overflow:hidden;background:var(--red);position:relative;display:flex;align-items:flex-end;padding:12px}
.flyer-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.flyer-art svg{position:absolute;inset:0;width:100%;height:100%}
.badge{position:relative;display:inline-flex;gap:6px;align-items:center;background:var(--mustard-tint);color:var(--red-dark);font-size:12px;font-weight:800;padding:5px 10px;border-radius:999px}
.flyer-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px}
.flyer-when{font-size:13px;font-weight:800;color:var(--red);letter-spacing:.03em}
.flyer-title{font-family:var(--serif);font-weight:800;font-size:21px;line-height:1.15}
.btn{min-height:46px;border-radius:12px;border:1px solid var(--sage);background:var(--sage);color:#fff;font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;padding:0 16px;text-align:center}
.btn.ghost{background:#fff;color:var(--ink);border-color:var(--line2)}
.btn.red{background:var(--red);border-color:var(--red)}
.btn.soft{background:var(--sage-tint);color:var(--sage)}
.btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* sponsor */
.sponsor{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:var(--sage);color:#fff}
.sponsor-mark{width:40px;height:40px;border-radius:10px;background:var(--cream);color:var(--sage);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;flex:none}
.sponsor small{display:block;font-size:11px;letter-spacing:.08em;font-weight:700;color:var(--sage-light)}
.sponsor strong{font-size:14px;font-weight:700}

/* category grid */
.cat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cat{min-height:108px;padding:12px 6px 10px;border-radius:16px;border:1px solid var(--line);background:#fff;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.cat-ring{width:48px;height:48px;border-radius:24px;display:flex;align-items:center;justify-content:center}
.cat-ring svg{width:24px;height:24px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cat-name{font-size:12px;font-weight:800;line-height:1.2}
.cat-count{font-size:11px;color:var(--muted)}

/* calendar */
.month{background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px 10px 10px}
.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.dow{text-align:center;font-size:12px;font-weight:700;color:var(--muted);padding:4px 0}
.day{height:46px;border-radius:12px;border:1px solid transparent;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-weight:700;font-size:15px;cursor:pointer}
.day .dot{width:5px;height:5px;border-radius:3px;background:transparent}
.day.has .dot{background:var(--red)}
.day.today{border:2px solid var(--sage);color:var(--sage);background:#fff}
.day[aria-pressed="true"]{background:var(--sage);color:#fff;border-color:var(--sage)}
.day[aria-pressed="true"] .dot{background:var(--mustard-tint)}
.day.past{color:#B8A894}

/* detail */
.detail-art{height:220px;margin:-4px -20px 0;background:var(--red);position:relative;overflow:hidden}
.detail-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.detail-art svg{position:absolute;inset:0;width:100%;height:100%}
.back{position:absolute;left:16px;top:16px}
.facts{display:flex;flex-direction:column;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 16px}
.fact{display:flex;gap:12px;align-items:flex-start;font-size:15px;line-height:1.4}
.fact svg{width:20px;height:20px;flex:none;fill:none;stroke:var(--sage);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-top:1px}
.actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.actions .btn{flex-direction:column;min-height:64px;font-size:13px;gap:4px}
.desc{margin:0;font-size:15px;line-height:1.6;color:#3F3226;white-space:pre-line}
.source{font-size:12px;color:var(--muted)}

/* forms */
.panel{display:flex;flex-direction:column;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px}
.field{display:flex;flex-direction:column;gap:4px}
.field label{font-size:13px;font-weight:700;color:var(--muted2)}
.field input,.field select,.field textarea{min-height:46px;padding:10px 12px;border-radius:10px;border:1px solid var(--line2);font:500 16px var(--sans);color:var(--ink);background:#fff;width:100%}
.field textarea{min-height:110px;resize:vertical}
.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.check{display:flex;gap:10px;align-items:flex-start;padding:14px;border-radius:14px;background:var(--mustard-tint);border:2px solid var(--red);font-size:14px;line-height:1.4}
.check input{width:22px;height:22px;flex:none;margin:0}
.note{display:flex;gap:10px;padding:12px 14px;border-radius:12px;background:var(--sage-tint);color:var(--sage);font-size:14px;font-weight:600;line-height:1.4}
.empty{padding:20px;text-align:center;font-size:14px;color:var(--muted);background:#fff;border-radius:14px;border:1px dashed var(--stamp);line-height:1.5}
.loading{padding:40px 0;text-align:center;color:var(--muted)}

/* map */
#map{height:280px;border-radius:18px;overflow:hidden;border:1px solid var(--line);z-index:0}
.pin{width:28px;height:28px;border-radius:14px 14px 14px 3px;transform:rotate(-45deg);background:var(--red);border:2px solid #fff;box-shadow:0 2px 6px rgba(74,52,36,.3)}

/* tab bar */
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:560px;display:flex;justify-content:space-around;align-items:center;height:calc(72px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);z-index:10}
.tabbar a{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:60px;padding:6px 0;font-size:11px;font-weight:600;color:var(--muted)}
.tabbar svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tabbar a.tab-post svg{stroke:var(--red)}
.tabbar a[aria-current="page"]{color:var(--sage);font-weight:800}

.toast{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 16px;border-radius:999px;font-size:14px;font-weight:700;z-index:20;box-shadow:0 4px 12px rgba(0,0,0,.2)}
.footer{font-size:12px;color:var(--muted);text-align:center;line-height:1.6;padding:8px 0 0}
.footer a{color:var(--sage);font-weight:700}
