:root { font-family: "Hiragino Sans", "Yu Gothic", system-ui, sans-serif; color: #241d32; background: #f8f6fb; color-scheme: light; }
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 92% 2%, #f1dcfc 0, transparent 33rem),
    radial-gradient(ellipse at 6% 18%, #e6dffa 0, transparent 32rem),
    linear-gradient(165deg, #faf7ff, #f8f6fb 42rem);
}
.wrap { width: min(100% - 2.5rem, 1040px); margin-inline: auto; }
.site-header { text-align: center; background: #fff9; border-bottom: 1px solid #e6dff0; }
.brand { display: inline-flex; align-items: center; gap: .8rem; min-height: 66px; color: #2e2047; text-decoration: none; font-size: 1.08rem; font-weight: 800; letter-spacing: .045em; }
.brand-logo { display: block; width: min(240px, 72vw); height: 60px; object-fit: contain; }
.calendar-intro { padding: .85rem 0 .75rem; }
h1 { font-size: clamp(2.25rem, 6vw, 4rem); letter-spacing: -.045em; margin: 0; line-height: 1.15; }
.note { color: #645c76; font-size: .85rem; margin: 0; }
.dates { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding: 0; }
button, input { font: inherit; min-height: 42px; border: 1px solid #d8cde9; border-radius: 8px; color: #35245b; background: #fff; padding: .45rem .85rem; }
button { cursor: pointer; }
button:hover { background: #eae0fb; }
.ticket:hover { background: #472588; }
:focus-visible { outline: 3px solid #7445c8; outline-offset: 2px; }
.section-head { display: flex; align-items: baseline; gap: .8rem; margin: 1.8rem 0 .8rem; }
.section-head h2 { font-size: 1.2rem; margin: 0; }
#count { color: #513584; background: #eee5f9; padding: .24rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
#events { display: grid; gap: .75rem; padding-bottom: 3rem; }
.event, .empty { background: #fff; border: 1px solid #e6e2ef; border-radius: 18px; padding: clamp(1rem, 3vw, 1.45rem); box-shadow: 0 6px 22px #38265a09; }
.event { display: grid; grid-template-columns: minmax(0, 1fr) 128px; grid-template-areas: "time time" "details poster" "actions poster" "source source"; gap: .75rem 1rem; align-items: start; }
.time { grid-area: time; justify-self: start; padding: .35rem .65rem; background: #f5effc; border-radius: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: .65rem; color: #57329c; font-variant-numeric: tabular-nums; }
.details { grid-area: details; min-width: 0; }
.ticket-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.event:not(:has(.preview)) { grid-template-columns: 1fr; grid-template-areas: "time" "details" "actions" "source"; }
.event > .source[hidden] { display: none; }
.event > .source { grid-area: source; }
.start { font-weight: 800; font-size: 1.02rem; white-space: nowrap; }
.doors, .performers { color: #645c76; }
.venue { color: #583699; font-size: .84rem; font-weight: 700; margin: 0 0 .35rem; }
h3 { font-size: 1.12rem; line-height: 1.5; margin: 0; }
.performers { font-size: .85rem; line-height: 1.7; margin: .35rem 0 0; overflow-wrap: anywhere; }
.ticket { color: #fff; background: #5a33a8; padding: .68rem .85rem; border-radius: .55rem; font-weight: 700; font-size: .82rem; text-decoration: none; }
.empty p { margin: 0 0 .65rem; color: #645c76; }
.empty button { margin: .35rem .4rem 0 0; font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 540px) {
  .event { grid-template-columns: minmax(0, 1fr) 88px; gap: .65rem .65rem; padding: .85rem; }
  .time { display: flex; align-items: baseline; gap: .65rem; }
  .ticket { justify-self: start; }
  .event h3 { font-size: 1rem; }
}

.preview { grid-area: poster; min-width: 0; text-align: center; padding: .35rem; background: #f8f6fb; border-radius: 10px; }

.performers { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; margin-top: .65rem; }
.performers[hidden] { display: none; }
.performers li { max-width: 100%; min-width: 0; }
.performers li[hidden] { display: none; }
.event .group-tag { min-height: 32px; padding: .3rem .6rem; font-size: .8rem; }
.event .group-info { flex-basis: 30px; min-height: 32px; font-size: .9rem; }
.lineup-toggle { min-height: 32px; margin-top: .4rem; padding: .25rem .15rem; border: 0; background: transparent; color: #68439e; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.lineup-toggle:hover { background: transparent; color: #35245b; }
.group-tag { display: inline-block; max-width: 100%; min-height: 36px; padding: .3rem .75rem; border: 1px solid #ddd2ee; border-radius: 999px; background: #f7f2fd; color: #372259; font-size: .875rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.group-tag[aria-pressed="true"] { background: #5a33a8; color: #fff; }

.source { grid-column: 1 / -1; font-size: .8rem; color: #583699; }

.preview img { display: block; margin-inline: auto; width: 100%; height: auto; max-height: 180px; object-fit: contain; border-radius: 6px; }
.image-source { display: inline-block; margin-top: .3rem; color: #645c76; font-size: .65rem; line-height: 1.4; }

.price { margin: .65rem 0 0; font-size: .85rem; font-weight: 700; line-height: 1.65; }

.poster-trigger { display: block; width: min(100%, 320px); margin-inline: auto; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
#poster-dialog { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); padding: .75rem; border: 0; border-radius: 14px; }
#poster-dialog::backdrop { background: rgb(20 14 33 / .75); }
#poster-dialog form { display: flex; justify-content: flex-end; margin-bottom: .5rem; }
#poster-image { display: block; max-width: min(84vw, 960px); max-height: calc(100dvh - 7rem); object-fit: contain; margin-inline: auto; }

.sales-period { margin: .35rem 0 0; color: #645c76; font-size: .85rem; line-height: 1.65; }

.calendar-panel { padding: clamp(.8rem, 2.5vw, 1.3rem); border: 1px solid #e6e2ef; border-radius: 20px; background: #fff; box-shadow: 0 8px 26px #38265a0b; }
.calendar { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #ece7f2; }
.calendar-toolbar, .calendar-navigation, .calendar-modes { display: flex; align-items: center; gap: .35rem; }
.calendar-toolbar { justify-content: space-between; flex-wrap: wrap; margin-bottom: .65rem; }
.calendar-navigation h2 { margin: 0 .3rem; font-size: .95rem; }
.calendar-modes { padding: .2rem; border-radius: 10px; background: #f3edf9; }
.calendar-modes button { border-color: transparent; background: transparent; min-width: 42px; }
.calendar-toolbar button { min-height: 36px; padding: .25rem .68rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.calendar-grid > span { text-align: center; font-size: .75rem; color: #645c76; padding-bottom: .35rem; }
.calendar-day { display: grid; justify-items: center; align-content: start; gap: .1rem; min-height: 48px; padding: .3rem .1rem; font-weight: 700; }
.calendar-day small { font-size: .7rem; }
.calendar-day.outside-month { color: #645c76; background: #f7f6fb; }
.calendar-day[aria-current="date"] { border-color: #7445c8; }
.calendar-day[aria-pressed="true"], .calendar-modes button[aria-pressed="true"] { background: #5a33a8; color: #fff; }

.week-calendar .calendar-day { padding: .55rem .35rem; }
.week-calendar .calendar-day-label { font-size: .8rem; }
.week-event { display: grid; gap: .16rem; width: 100%; margin-top: .35rem; padding: .4rem; border-radius: 6px; background: #f5effc; color: #35245b; text-align: left; font-size: .76rem; line-height: 1.4; overflow-wrap: anywhere; }
.week-event small { font-weight: 400; }
@media (max-width: 700px) {
  .calendar:has(.week-calendar) .calendar-grid[aria-hidden="true"] { display: none; }
  .week-calendar { grid-template-columns: 1fr; }
  .week-calendar .calendar-day { justify-items: start; padding: .5rem; }
}

.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: .65rem; align-items: end; margin-top: .85rem; }
.filters button { font-size: .85rem; }
@media (max-width: 700px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.filter-picker { display: grid; gap: .3rem; min-width: 0; font-size: .85rem; font-weight: 700; }
.filter-picker button { width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-picker button.filter-active { background: #eee4fa; border-color: #825bbd; color: #432477; }
#filter-dialog, .idol-profile { width: min(420px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid #e6e2ef; border-radius: 14px; padding: 1rem; color: inherit; }
#filter-dialog::backdrop, .idol-profile::backdrop { background: rgb(20 14 33 / .55); }
.filter-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .65rem; }
.filter-dialog-header h2 { font-size: 1.05rem; margin: 0; }
#filter-search { width: 100%; }
#filter-options { list-style: none; padding: 0; margin: .65rem 0 0; display: grid; gap: .3rem; max-height: min(44dvh, 25rem); overflow-y: auto; }
#filter-empty { font-size: .85rem; }

#filter-clear { margin-top: .65rem; font-size: .85rem; }
#filter-clear:disabled { opacity: .55; cursor: default; }
#filter-options label { display: flex; align-items: center; gap: .55rem; min-height: 42px; padding: .35rem .5rem; border-radius: 8px; background: #f7f6fb; cursor: pointer; }
#filter-options label:has(input:checked) { background: #eee4fa; color: #432477; }
#filter-options input { min-height: 0; width: 1.05rem; height: 1.05rem; accent-color: #5a33a8; flex-shrink: 0; }

.performers .has-profile { display: flex; align-items: stretch; }
.has-profile .group-tag { min-width: 0; border-radius: 999px 0 0 999px; }
.group-info { flex: 0 0 36px; min-height: 36px; padding: 0; border: 1px solid #ddd2ee; border-left: 0; border-radius: 0 999px 999px 0; background: #eee4fa; color: #513584; font: 700 1rem/1 Georgia, serif; }
.group-info:hover, .group-info:focus-visible { background: #e0cef5; }
.performers button:focus-visible { position: relative; z-index: 1; outline-offset: 0; }
.idol-profile p { font-size: .9rem; line-height: 1.75; }
.profile-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-links a { padding: .5rem .7rem; background: #f3edfc; color: #4e2c8c; border-radius: .5rem; font-size: .85rem; font-weight: 700; }


@media (max-width: 620px) {
  .wrap { width: calc(100% - 1.5rem); }
  .brand { min-height: 56px; }
  .event .time { justify-self: start; }
  .ticket { overflow-wrap: anywhere; }
}

.view-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .3rem;
  margin-top: 1rem;
  padding: .35rem;
  border: 1px solid #e2d8ef;
  border-radius: 16px;
  background: #fcfaff;
  box-shadow: 0 4px 14px #38265a0d;
}
.view-nav a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: .45rem .55rem;
  border-radius: 11px;
  color: #513584;
  text-align: center;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
}
.view-nav a:hover { background: #f0e7fb; }
.view-nav a[aria-current="page"] {
  background: #5a33a8;
  color: #fff;
  box-shadow: 0 2px 6px #43247733;
}
.directory-index [aria-pressed="true"] { background: #5a33a8; color: #fff; }
@media (max-width: 760px) {
  .view-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-nav a:first-child { grid-column: 1 / -1; }
}
.directory { margin: 1.5rem 0 3rem; padding: clamp(1rem, 3vw, 1.5rem); background: #fff; border: 1px solid #e6e2ef; border-radius: 18px; }
.directory h1 { font-size: clamp(1.65rem, 5vw, 2.4rem); margin-bottom: 1rem; }
.directory label { display: block; margin-bottom: .35rem; font-size: .85rem; font-weight: 700; }
#directory-search { width: min(100%, 28rem); }
.directory-index, .directory-choices { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.directory-index button:disabled { opacity: .4; cursor: default; }
.directory-index button, .directory-choices button { font-size: .85rem; }
.directory-profile { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid #e6e2ef; }
.directory-profile h3 { margin-top: 1rem; }
.directory-event { margin-block: .65rem; padding: .8rem; border-radius: 10px; background: #f7f2fc; }
.directory-event a { color: #513584; font-weight: 700; }
.directory-event p, .directory-event a:last-child { font-size: .85rem; }

#venue-directory-search, #event-directory-search { width: min(100%, 28rem); }
.event-directory-controls { display: flex; flex-wrap: wrap; gap: .7rem; }
.event-directory-controls select, .filter-picker select { font: inherit; min-height: 42px; padding: .45rem .65rem; border: 1px solid #d8cde9; border-radius: 8px; background: #fff; color: #35245b; }

.directory-choices button { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.directory-choices small { display: block; margin-top: .15rem; color: #645c76; }
.idol-directory-entry { flex: 1 1 250px; max-width: 360px; padding: .8rem; border: 1px solid #e6dfef; border-radius: 12px; background: #fff; }
.idol-directory-entry > button { width: 100%; font-weight: 700; }
.idol-directory-entry .profile-links { margin-top: .6rem; gap: .4rem .7rem; }
.idol-directory-entry .profile-links a { font-size: .8rem; }
.filter-picker select { width: 100%; min-width: 0; }

/* Raikare logo */
.brand-logo.raikare-logo { width:min(280px, 72vw); height:auto; padding:6px 0; }
