/* Events Calendar — full-viewport English month grid + rail.
 * Theme-matched: teal #1a6b6b / deep #115252 / tint #eef8f8,
 * body Inter, headings 'Plus Jakarta Sans'. */
/* NOTE: the calendar lives inside the theme .max-w-7xl container (same
 * left/right alignment as header/footer); no full-bleed wrapper. */
.ph-cal-wrap{display:grid;grid-template-columns:1fr;gap:16px;font-family:Inter,sans-serif}
@media(min-width:1024px){
  .ph-cal-wrap{grid-template-columns:minmax(0,1fr) 340px;align-items:stretch;height:calc(100vh - 350px);min-height:540px}
}
.ph-cal-card,.ph-cal-side{background:#fff;border:1px solid #e8eaed;border-radius:16px;box-shadow:0 1px 2px rgba(16,24,40,.04);min-height:0}
.ph-cal-card{padding:14px 16px 12px;display:flex;flex-direction:column;overflow:hidden}
.ph-cal-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.ph-cal-title h2{margin:0;font-family:'Plus Jakarta Sans',Inter,sans-serif;font-size:19px;line-height:1.2;color:#111827;font-weight:800}
.ph-cal-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.ph-cal-select{border:1px solid #dfe5e5;border-radius:9px;padding:7px 10px;font-size:13.5px;font-weight:600;color:#0f3d3d;background:#fff;font-family:Inter,sans-serif;max-height:220px}
.ph-cal-select:focus{outline:2px solid #1a6b6b;outline-offset:1px;border-color:#1a6b6b}
.ph-cal-select option{padding:4px 8px}
.ph-cal-date{border:1px solid #dfe5e5;border-radius:9px;padding:6px 10px;font-size:13px;color:#0f3d3d;background:#fff;font-family:Inter,sans-serif}
.ph-cal-date:focus{outline:2px solid #1a6b6b;outline-offset:1px;border-color:#1a6b6b}
.ph-cal-nav{display:flex;align-items:center;gap:8px}
.ph-cal-todaybtn{background:#1a6b6b;color:#fff;border:0;border-radius:9px;padding:8px 16px;font-size:13px;font-weight:700;font-family:Inter,sans-serif;cursor:pointer}
.ph-cal-todaybtn:hover{background:#115252}
.ph-cal-arrow{width:34px;height:34px;border-radius:50%;border:1px solid #dfe5e5;background:#fff;color:#0f3d3d;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.ph-cal-arrow:hover{border-color:#1a6b6b;color:#1a6b6b}
.ph-cal-arrow svg{width:16px;height:16px}
.ph-cal-gridwrap{flex:1;min-height:0;display:flex}
.ph-cal-grid{border:1px solid #eef0f2;border-radius:12px;overflow:hidden;flex:1;display:flex;flex-direction:column;min-height:0;min-width:0}
.ph-cal-week{display:grid;grid-template-columns:repeat(7,1fr);background:#eef8f8;border-bottom:1px solid #d9ecec}
.ph-cal-weekday{padding:7px 4px;text-align:center;font-size:11px;font-weight:800;color:#0f3d3d;text-transform:uppercase;letter-spacing:.04em;font-family:'Plus Jakarta Sans',Inter,sans-serif;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-cal-weekday__short{display:none}
.ph-cal-weekday.ph-cal-week--weekend{color:#b91c1c}
.ph-cal-days{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:1fr;flex:1;min-height:0}
.ph-cal-day{background:#fff;border:0;border-right:1px solid #eef0f2;border-bottom:1px solid #eef0f2;min-height:0;min-width:0;padding:5px 6px 6px;display:flex;flex-direction:column;align-items:stretch;gap:1px;cursor:pointer;text-align:center;transition:background .15s;font-family:Inter,sans-serif}
.ph-cal-day:nth-child(7n){border-right:0}
.ph-cal-day:nth-last-child(-n+7){border-bottom:0}
.ph-cal-day:hover{background:#eef8f8}
.ph-cal-day.is-outside{background:#fafbfc;color:#9ca3af}
.ph-cal-day.is-outside .ph-cal-num{color:#9ca3af}
.ph-cal-day.is-today{background:#1a6b6b;color:#fff}
.ph-cal-day.is-today .ph-cal-num{color:#fff}
.ph-cal-day.is-today .ph-cal-ev{color:#e6f4f4}
.ph-cal-day.is-today .ph-cal-more{color:#fff}
.ph-cal-day.is-selected{box-shadow:inset 0 0 0 2px #1a6b6b}
.ph-cal-daytop{min-height:28px;display:flex;flex-direction:column;gap:2px;justify-content:flex-start}
.ph-cal-ev{font-size:10px;line-height:1.25;color:#374151;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ph-cal-num{font-size:clamp(16px,1.4vw,21px);font-weight:800;line-height:1.1;color:#111827;font-family:'Plus Jakarta Sans',Inter,sans-serif}
.ph-cal-day.is-weekend .ph-cal-num{color:#b91c1c}
.ph-cal-day.is-today.is-weekend .ph-cal-num{color:#fff}
.ph-cal-day.is-outside .ph-cal-ev{color:#9ca3af}
.ph-cal-daybottom{min-height:14px;display:flex;align-items:center;justify-content:center}
.ph-cal-more{font-size:11px;font-weight:700;color:#1a6b6b}
.ph-cal-dots{display:inline-flex;gap:4px}
.ph-cal-dots span{width:5px;height:5px;border-radius:50%;background:#1a6b6b;display:inline-block}
.ph-cal-day.is-today .ph-cal-dots span{background:#fff}
/* Rail */
.ph-cal-side{padding:0;overflow:hidden;display:flex;flex-direction:column;min-height:0}
.ph-cal-side [data-rail]{display:flex;flex-direction:column;min-height:0;flex:1}
.ph-cal-railhead{padding:14px 16px 0}
.ph-cal-tabs{display:flex;flex-wrap:wrap;gap:6px 20px;border-bottom:1px solid #eef0f2;margin-bottom:10px}
.ph-cal-tab{border:0;background:none;padding:8px 2px;font-size:14px;font-weight:700;font-family:'Plus Jakarta Sans',Inter,sans-serif;color:#6b7280;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.ph-cal-tab.is-active{color:#1a6b6b;border-bottom-color:#1a6b6b}
.ph-cal-selbar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#eef8f8;border:1px solid #c9e8e8;border-radius:11px;padding:9px 12px;margin-bottom:10px}
.ph-cal-selbar[hidden]{display:none}
.ph-cal-selbar__info{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.ph-cal-selbar__info strong{font-size:13.5px;color:#0f3d3d;font-family:'Plus Jakarta Sans',Inter,sans-serif}
.ph-cal-badge{display:inline-block;font-size:11px;font-weight:800;padding:2px 9px;border-radius:999px;background:#1a6b6b;color:#fff;text-transform:uppercase;letter-spacing:.03em}
.ph-cal-selbar__count{font-size:12px;color:#4b5563}
.ph-cal-clear{border:1px solid #dfe5e5;background:#fff;border-radius:999px;font-size:12px;font-weight:700;font-family:Inter,sans-serif;color:#0f3d3d;padding:5px 13px;cursor:pointer;flex-shrink:0}
.ph-cal-clear:hover{border-color:#1a6b6b;color:#1a6b6b}
.ph-cal-todaybox{background:#eef8f8;border:1px solid #c9e8e8;border-radius:12px;margin:0 16px 10px;padding:12px}
.ph-cal-todaybox__kicker{margin:0 0 8px;font-size:11.5px;font-weight:800;color:#1a6b6b;text-transform:uppercase;letter-spacing:.04em;font-family:'Plus Jakarta Sans',Inter,sans-serif}
.ph-cal-todaybox__row{display:flex;align-items:center;gap:10px;text-decoration:none;color:#111827;padding:6px 0}
.ph-cal-todaybox__title{font-size:13.5px;font-weight:700;line-height:1.35}
.ph-cal-todaybox__row:hover .ph-cal-todaybox__title{color:#1a6b6b}
.ph-cal-todaybox__more{margin:4px 0 0;font-size:12px;color:#6b7280}
.ph-cal-list{overflow-y:auto;padding:0 8px 8px;display:flex;flex-direction:column;flex:1;min-height:0}
.ph-cal-list::-webkit-scrollbar{width:8px}
.ph-cal-list::-webkit-scrollbar-thumb{background:#d9ecec;border-radius:8px}
.ph-cal-row{display:flex;gap:10px;align-items:center;padding:10px 8px;border-bottom:1px solid #f0f4f4;text-decoration:none;color:inherit}
.ph-cal-row:hover{background:#f4faf9}
.ph-cal-row:last-child{border-bottom:0}
.ph-cal-thumb{width:40px;height:40px;border-radius:11px;object-fit:cover;flex-shrink:0}
.ph-cal-thumb--fallback{background:#eef8f8;color:#1a6b6b;display:inline-flex;align-items:center;justify-content:center;border:1px solid #c9e8e8}
.ph-cal-thumb--fallback svg{width:22px;height:22px}
.ph-cal-row__main{flex:1;min-width:0}
.ph-cal-row__title{display:block;font-size:13.5px;font-weight:700;color:#111827;line-height:1.4;font-family:'Plus Jakarta Sans',Inter,sans-serif}
.ph-cal-row__meta{display:block;font-size:12px;color:#6b7280;margin-top:2px}
.ph-cal-row__date{text-align:right;flex-shrink:0;display:flex;flex-direction:column;gap:1px;min-width:86px}
.ph-cal-row__date strong{font-size:13px;color:#111827}
.ph-cal-row__date small{font-size:11px;color:#6b7280}
.ph-cal-row__date em{font-style:normal;font-size:11px;color:#9ca3af}
.ph-cal-row__date em.is-today{color:#1a6b6b;font-weight:800}
.ph-cal-empty{text-align:center;padding:32px 16px;color:#6b7280}
.ph-cal-empty svg{width:40px;height:40px;color:#9ecaca;margin-bottom:8px}
.ph-cal-count{margin:0;padding:10px 16px;font-size:12px;color:#6b7280;border-top:1px solid #f0f4f4}
.ph-cal-loading{opacity:.55;pointer-events:none}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media(max-width:1023px){
  .ph-cal-days{grid-auto-rows:auto}
  .ph-cal-day{min-height:76px}
  .ph-cal-num{font-size:19px}
  .ph-cal-daytop{display:none}
  .ph-cal-card{padding:12px}
  .ph-cal-side{max-height:70vh}
}
/* Tablet portrait: roomier cells, rail below grid with a comfortable cap. */
@media(min-width:640px) and (max-width:1023px){
  .ph-cal-day{min-height:92px}
  .ph-cal-daytop{display:flex}
  .ph-cal-side{max-height:62vh}
}
/* Phones: abbreviated weekdays, stacked controls, larger touch targets. */
@media(max-width:639px){
  .ph-cal-wrap{gap:12px}
  .ph-cal-card,.ph-cal-side{border-radius:14px}
  .ph-cal-title h2{font-size:17px}
  .ph-cal-top{flex-direction:column;align-items:stretch}
  .ph-cal-controls{margin-left:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .ph-cal-select{width:100%;font-size:16px}
  .ph-cal-date{grid-column:1/-1;width:100%;font-size:16px}
  .ph-cal-nav{justify-content:space-between}
  .ph-cal-todaybtn{flex:1;padding:10px 16px}
  .ph-cal-arrow{width:42px;height:42px}
  .ph-cal-weekday{font-size:10px;padding:7px 2px}
  .ph-cal-weekday__full{display:none}
  .ph-cal-weekday__short{display:inline}
  .ph-cal-day{min-height:64px;padding:4px 2px 6px}
  .ph-cal-num{font-size:17px}
  .ph-cal-daybottom{min-height:12px}
  .ph-cal-dots span{width:7px;height:7px}
  .ph-cal-more{font-size:10px}
  .ph-cal-selbar{flex-direction:column;align-items:stretch}
  .ph-cal-clear{align-self:flex-start}
  .ph-cal-railhead{padding:12px 12px 0}
  .ph-cal-todaybox{margin:0 12px 10px}
  .ph-cal-thumb{width:36px;height:36px;border-radius:10px}
  .ph-cal-row__title{font-size:13px}
  .ph-cal-row__meta{font-size:11.5px}
  .ph-cal-row__date{min-width:70px}
}
/* Very small phones: tighten rail date column further. */
@media(max-width:359px){
  .ph-cal-row{gap:8px;padding:9px 4px}
  .ph-cal-row__date{min-width:64px}
  .ph-cal-row__date small{display:none}
}
/* Touch devices: disable sticky hover tint on day cells. */
@media(hover:none){
  .ph-cal-day:hover{background:#fff}
  .ph-cal-day.is-today:hover{background:#1a6b6b}
}
