/* OeGG event calendar — layout follows the reference image supplied by 大阪府 日下様 (2026-09-08).
   Static, runtime-free: no web fonts, no network requests, no analytics. */
.oegg-cal {
  --cal-purple: #4e2a9b;
  --cal-purple-soft: #f3eefc;
  --cal-purple-line: #ded1f5;
  --cal-ink: #232a38;
  --cal-sub: #5c6473;
  --cal-line: #e4e6ec;
  --cal-panel: #ffffff;
  --cal-page: #f9fafa;
  --cal-dark: #252b3a;
  box-sizing: border-box;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 0 72px;
  background: var(--cal-page);
  color: var(--cal-ink);
  font: 16px/1.7 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, Arial, sans-serif;
}
.oegg-cal *, .oegg-cal *::before, .oegg-cal *::after { box-sizing: border-box; }
.oegg-cal svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
.oegg-cal svg.cal-stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cal-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Hero */
.cal-hero {
  margin: 0 0 28px;
  padding: 42px 24px 34px;
  text-align: center;
  background: linear-gradient(180deg, #efdfea 0%, #f3e6ef 40%, #f9fafb 100%);
}
.cal-hero h1 { margin: 0 0 10px; font-size: 40px; line-height: 1.3; letter-spacing: .04em; color: #1e2431; }
.cal-hero p { margin: 0; font-size: 15px; color: #4a5161; }

/* Shell */
.cal-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 0 24px; align-items: start; }
.cal-primary { min-width: 0; }

/* Pickers */
.cal-picker { display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.cal-pickrow { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cal-step { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; font-weight: 700; color: var(--cal-purple); line-height: 1.4; }
.cal-step span { font-size: 15px; }
.cal-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 70px; min-height: 38px; padding: 7px 12px;
  border: 1px solid var(--cal-line); border-radius: 8px;
  background: #fdfdff; color: #2b3242; font-size: 14px; font-weight: 600; text-decoration: none;
}
.cal-pills-month .cal-pill { min-width: 48px; padding: 7px 6px; }
.cal-pill:hover { border-color: var(--cal-purple-line); background: var(--cal-purple-soft); }
.cal-pill.is-current { background: var(--cal-purple); border-color: var(--cal-purple); color: #fff; }
.cal-pill.is-empty { color: #a7acb8; background: #f4f5f7; border-style: dashed; cursor: default; }
.cal-pickaside { margin: 0; font-size: 13px; }
.cal-pickaside a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--cal-line); border-radius: 8px; background: #fff; color: var(--cal-sub); text-decoration: none; }
.cal-pickaside a:hover { border-color: var(--cal-purple-line); color: var(--cal-purple); }
.cal-pickrow-genre { align-items: start; }
.cal-genres { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 2 / -1; }
.cal-genre {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 58px; padding: 7px 9px;
  border: 1px solid var(--cal-line); border-radius: 10px;
  background: #fff; color: #2b3242; font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.cal-genre:hover { border-color: var(--cal-purple-line); background: var(--cal-purple-soft); }
.cal-genre.is-current { background: var(--cal-purple); border-color: var(--cal-purple); color: #fff; }
.cal-genre-icon { display: grid; place-items: center; font-size: 18px; color: #6a7181; }
.cal-genre.is-current .cal-genre-icon { color: #fff; }
.cal-genre-text { display: flex; flex-direction: column; line-height: 1.35; }
.cal-genre-text b { font-size: 13px; font-weight: 700; white-space: nowrap; }
.cal-genre-text small { font-size: 10.5px; color: var(--cal-sub); max-width: 112px; }
.cal-genre.is-current .cal-genre-text small { color: #e4dcf7; }
.cal-genre-event .cal-genre-icon { color: #e08a5c; }
.cal-genre-major .cal-genre-icon { color: #c9a125; }
.cal-genre-taiken .cal-genre-icon { color: #4d82a6; }
.cal-genre-seminar .cal-genre-icon { color: #4e9457; }
.cal-genre-community .cal-genre-icon { color: #6f5bb5; }
.cal-genre-other .cal-genre-icon { color: #8a909c; }
.cal-hostrow { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 128px; }
.cal-hostpill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 6px 16px;
  border: 1px solid var(--cal-line); border-radius: 8px;
  background: #fff; color: #2b3242; font: inherit; font-size: 13px; cursor: pointer;
}
.cal-hostpill:hover { border-color: var(--cal-purple-line); background: var(--cal-purple-soft); }
.cal-hostpill.is-current { background: var(--cal-purple); border-color: var(--cal-purple); color: #fff; }
.cal-hostpill.is-current .cal-host-dot { background: #fff; }
.cal-hostpill.is-current .cal-host-star { color: #ffd964; }

/* Host marks */
.cal-host-mark { display: inline-flex; align-items: center; justify-content: center; }
.cal-host-dot { width: 10px; height: 10px; border-radius: 50%; background: #5b3fbf; }
.cal-host-star { color: #f1c449; font-size: 15px; }
.cal-host-query { width: 15px; height: 15px; border-radius: 50%; background: #d4d7de; color: #4c5260; font-size: 10px; font-weight: 700; line-height: 15px; }

/* List head */
.cal-listhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 26px 0 12px; }
.cal-listhead h2 { margin: 0; font-size: 25px; line-height: 1.4; color: #1e2431; }
.cal-listcount { display: flex; align-items: baseline; gap: 12px; margin: 0; font-size: 14px; color: var(--cal-sub); }
.cal-listnote { font-size: 12px; }
.cal-listtools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.cal-sort select { min-height: 40px; padding: 8px 12px; border: 1px solid var(--cal-line); border-radius: 8px; background: #fff; color: #2b3242; font: inherit; font-size: 13px; }
.cal-viewtoggle { display: inline-flex; gap: 8px; }
.cal-viewtoggle button {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--cal-line); border-radius: 8px;
  background: #fff; color: #2b3242; font: inherit; font-size: 13px; cursor: pointer;
}
.cal-viewtoggle button.is-current { background: var(--cal-purple); border-color: var(--cal-purple); color: #fff; }
.calendar-draft { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid #ce9b23; border-radius: 0 6px 6px 0; background: #fff7e3; font-size: 13px; line-height: 1.75; }

/* Cards */
.calendar-grid { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.calendar-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 232px 44px;
  gap: 0 18px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--cal-line); border-radius: 12px;
  background: var(--cal-panel);
  overflow: hidden;
}
.cal-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  align-self: stretch; padding: 22px 6px;
  background: var(--cal-dark); color: #fff; text-align: center;
}
.cal-date-head { font-size: 26px; font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
.cal-date-head.cal-date-long { font-size: 17px; }
.cal-date-dow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #252b3a; font-size: 13px; font-weight: 700; }
.cal-date-dow.cal-dow-sun { background: #ee3a33; color: #fff; }
.cal-date-dow.cal-dow-sat { background: #2c6fc4; color: #fff; }
.cal-date-rest { font-size: 11px; line-height: 1.5; color: #d3d7e2; overflow-wrap: anywhere; }
.cal-card-main { min-width: 0; padding: 18px 0; }
.cal-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; }
.cal-chip { display: inline-flex; align-items: center; padding: 3px 14px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #2a2f24; }
.cal-chip-event { background: #f9b9a1; color: #4a2b1c; }
.cal-chip-major { background: #f3d765; color: #45390f; }
.cal-chip-taiken { background: #88b6ca; color: #12303f; }
.cal-chip-seminar { background: #96cb7c; color: #1c3b1a; }
.cal-chip-community { background: #c8b6ec; color: #2f2255; }
.cal-chip-other { background: #d9dce2; color: #343a46; }
.cal-host { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.cal-host-member { color: #5b3fbf; }
.cal-host-large { color: #3b4352; }
.cal-host-unknown { color: #6c7280; font-weight: 600; }
.calendar-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.55; font-weight: 700; }
.calendar-card h3 a { color: #1e2431; text-decoration: none; }
.calendar-card h3 a:hover { text-decoration: underline; }
.cal-game { margin: -4px 0 8px; font-size: 12px; color: var(--cal-sub); }
.cal-meta { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.75; color: #444c5b; }
.cal-meta li { display: flex; align-items: flex-start; gap: 8px; }
.cal-meta svg { margin-top: .32em; font-size: 14px; color: #6d7482; }
.cal-meta span { min-width: 0; overflow-wrap: anywhere; }
.cal-thumb { align-self: center; }
.cal-thumb img { display: block; width: 100%; height: auto; max-height: 132px; object-fit: cover; border-radius: 8px; }
.cal-go { display: grid; place-items: center; align-self: stretch; padding: 0 8px; color: #6d7482; text-decoration: none; font-size: 19px; }
.cal-go span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cal-go:hover { color: var(--cal-purple); background: var(--cal-purple-soft); }
.cal-links { grid-column: 2 / -1; margin: 0 0 14px; font-size: 12px; }
.cal-links:empty { display: none; }
.cal-links a { color: #185087; margin-right: 14px; overflow-wrap: anywhere; }
.cal-empty { margin: 24px 0; padding: 20px; border: 1px dashed var(--cal-line); border-radius: 10px; background: #fff; font-size: 14px; text-align: center; color: var(--cal-sub); }
.calendar-note { margin: 24px 0 0; font-size: 12px; color: var(--cal-sub); }

/* Month grid view */
.cal-gridview { overflow-x: auto; }
.cal-monthgrid { width: 100%; min-width: 660px; table-layout: fixed; border-collapse: collapse; background: #fff; border: 1px solid var(--cal-line); border-radius: 12px; overflow: hidden; }
.cal-monthgrid th { padding: 9px 4px; background: #f3f4f7; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--cal-line); }
.cal-monthgrid th.cal-cell-sun { color: #d33128; }
.cal-monthgrid th.cal-cell-sat { color: #2c6fc4; }
.cal-cell { width: 14.28%; height: 98px; overflow: hidden; padding: 6px; vertical-align: top; border: 1px solid var(--cal-line); }
.cal-cell-empty { background: #fafbfc; }
.cal-cell-day { display: block; font-size: 12px; font-weight: 700; color: #4b5261; margin-bottom: 4px; }
.cal-cell-sun .cal-cell-day { color: #d33128; }
.cal-cell-sat .cal-cell-day { color: #2c6fc4; }
.cal-cell-has { background: #fcfbff; }
.cal-daychip { display: block; margin-bottom: 3px; padding: 2px 6px; border-radius: 4px; font-size: 11px; line-height: 1.4; color: #2a2f24; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-daychip:hover { text-decoration: underline; }

/* Sidebar */
.cal-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.cal-legend { padding: 18px 18px 6px; border-radius: 12px; background: #f4f1f6; }
.cal-legend h2 { margin: 0 0 12px; font-size: 15px; }
.cal-legend dl { margin: 0; }
.cal-legend dl > div { margin: 0 0 14px; }
.cal-legend dt { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.cal-legend dd { margin: 0 0 0 24px; font-size: 12px; line-height: 1.7; color: #4e5563; }
.cal-legend-icon { display: grid; place-items: center; font-size: 16px; }
.cal-legend-event { color: #e08a5c; }
.cal-legend-major { color: #c9a125; }
.cal-legend-taiken { color: #4d82a6; }
.cal-legend-seminar { color: #4e9457; }
.cal-legend-community { color: #6f5bb5; }
.cal-legend-other { color: #8a909c; }
.cal-largenote { padding: 16px 18px; border-radius: 12px; background: #f5f1dd; }
.cal-largenote h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.cal-largenote p { margin: 0; font-size: 12px; line-height: 1.75; color: #4b4733; }

.oegg-cal :focus-visible { outline: 3px solid #cf6500; outline-offset: 3px; }

/* Tablet */
@media (max-width: 1180px) {
  .cal-shell { grid-template-columns: minmax(0, 1fr); }
  .cal-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .cal-legend, .cal-largenote { flex: 1 1 320px; }
  .calendar-card { grid-template-columns: 82px minmax(0, 1fr) 190px 40px; }
  .cal-genre-text b { white-space: normal; }
}
@media (max-width: 900px) {
  .cal-pickrow { grid-template-columns: minmax(0, 1fr); }
  .cal-pickaside { justify-self: start; }
  .cal-genres { grid-column: auto; }
  .cal-hostrow { margin-left: 0; }
  .calendar-card { grid-template-columns: 76px minmax(0, 1fr) 160px 38px; }
}

/* Phone */
@media (max-width: 640px) {
  .oegg-cal { font-size: 15px; }
  .cal-hero { padding: 28px 18px 24px; margin-bottom: 20px; }
  .cal-hero h1 { font-size: 26px; }
  .cal-hero p { font-size: 13px; }
  .cal-shell { padding: 0 16px; gap: 20px; }
  .cal-pills { gap: 8px; }
  .cal-pill { min-width: 0; flex: 1 1 62px; padding: 7px 8px; font-size: 13px; }
  .cal-pills-month .cal-pill { flex: 1 1 52px; min-width: 52px; }
  .cal-genres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cal-genre { min-height: 56px; padding: 8px 10px; }
  .cal-genre-text small { font-size: 10px; max-width: none; }
  .cal-hostpill { flex: 1 1 100%; justify-content: center; }
  .cal-listhead { gap: 6px; }
  .cal-listhead h2 { font-size: 20px; }
  .cal-listtools { margin-left: 0; width: 100%; }
  .cal-sort, .cal-sort select { width: 100%; }
  .cal-viewtoggle { width: 100%; }
  .cal-viewtoggle button { flex: 1 1 0; justify-content: center; padding: 8px 6px; }
  .calendar-card { grid-template-columns: 66px minmax(0, 1fr); gap: 0 12px; }
  .cal-date { padding: 14px 4px; }
  .cal-date-head { font-size: 20px; }
  .cal-date-head.cal-date-long { font-size: 14px; }
  .cal-card-main { padding: 14px 12px 4px 0; }
  .calendar-card h3 { font-size: 16px; }
  .cal-thumb { grid-column: 2 / -1; padding: 0 12px 12px 0; }
  .cal-thumb img { max-height: 170px; }
  .cal-go { grid-column: 2 / -1; place-items: start; padding: 0 12px 14px 0; font-size: 13px; }
  .cal-go span { position: static; width: auto; height: auto; clip-path: none; color: #185087; text-decoration: underline; }
  .cal-go svg { display: none; }
  .cal-links { grid-column: 1 / -1; padding: 0 12px 12px; }
  .cal-monthgrid { min-width: 560px; }
}
@media (prefers-reduced-motion: reduce) { .oegg-cal *, .oegg-cal *::before, .oegg-cal *::after { animation: none !important; transition: none !important; } }
