:root {
  color-scheme: light;
  --bg: #f8f5ef;
  --surface: #ffffff;
  --surface-muted: #f0ebe2;
  --text: #202124;
  --muted: #66615d;
  --line: #ded7cc;
  --accent: #b6405a;
  --teal: #21776f;
  --blue: #315f9c;
  --gold: #a57624;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Meiryo", "Yu Gothic", "Hiragino Sans", system-ui, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.page-shell {
  padding: 28px 0 48px;
}

.page-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}

.page-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.panel,
.image-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.panel h2,
.image-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
}

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.event-item {
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.event-item[data-type="general_sale"],
.event-item[data-type="presale_start"] {
  border-left-color: var(--teal);
}

.event-item[data-type="lottery_result"] {
  border-left-color: var(--blue);
}

.event-title {
  margin: 0;
  font-weight: 700;
}

.event-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.active-ranges-section {
  margin-top: 24px;
}

.active-range-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.active-range-card {
  display: grid;
  gap: 8px;
  background: var(--surface);
  border: 1px solid #cfe1dd;
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  padding: 14px 16px;
}

.active-range-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.range-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.range-label {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 9px;
  background: #e3f1ed;
  color: #155f58;
  font-size: 12px;
  font-weight: 700;
}

.range-period {
  margin: 0;
  font-weight: 700;
}

.days-left {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 9px;
  background: #fff3d7;
  color: #7a5418;
  font-size: 12px;
  font-weight: 700;
}

.range-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.image-panel {
  margin-top: 16px;
}

.status-panel {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.status-panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.4;
}

.status-panel[data-tone="warning"] {
  border-color: #d9a441;
}

.status-panel[data-tone="error"] {
  border-color: #c75151;
}

.status-message {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.status-item {
  min-width: 0;
}

.status-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-value {
  display: block;
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.status-footer a {
  white-space: nowrap;
}

.status-detail-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 700;
}

.footer-status-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-page {
  display: grid;
  gap: 18px;
}

.status-summary-card,
.status-metric,
.status-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-summary-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.status-summary-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.status-summary-card h2 {
  margin: 0;
  font-size: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge-ok {
  background: #e7f5ea;
  color: #1f6c3a;
}

.status-badge-warning {
  background: #fff3d7;
  color: #7a5418;
}

.status-badge-error {
  background: #ffe4e4;
  color: #a12a2a;
}

.status-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.status-metric {
  padding: 14px;
}

.status-metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-metric-value {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-link-list a {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.status-note {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.status-note p {
  margin: 0 0 8px;
}

.status-note p:last-child {
  margin-bottom: 0;
}

.daily-image {
  display: block;
  width: min(420px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-grid {
  display: grid;
  gap: 0;
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-weekday-row,
.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday-row {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-weekday-row > div {
  padding: 10px;
  border-right: 1px solid var(--line);
}

.calendar-weekday-row > div:last-child {
  border-right: 0;
}

.calendar-week {
  border-bottom: 1px solid var(--line);
}

.calendar-week:last-child {
  border-bottom: 0;
}

.calendar-week-grid {
  position: relative;
  min-height: calc(132px + var(--range-space, 0px));
  align-items: stretch;
}

.calendar-range-segment {
  display: block;
  min-width: 0;
  align-self: start;
  margin: calc(30px + var(--range-row-offset, 0px)) 4px 0;
  border: 1px solid #b8d6cf;
  background: #e5f3ef;
  color: #155f58;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.calendar-range-segment:hover {
  text-decoration: none;
  background: #d8ece7;
}

.calendar-range-segment-start,
.calendar-range-segment-single {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  border-left: 4px solid var(--teal);
}

.calendar-range-segment-end,
.calendar-range-segment-single {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  border-right: 4px solid var(--teal);
}

.calendar-range-segment-middle {
  opacity: 0.92;
}

.calendar-range-segment-active {
  background: #fff3d7;
  border-color: #d8b767;
  color: #76510f;
}

.calendar-range-segment-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-cell {
  min-height: calc(132px + var(--range-space, 0px));
  padding: 10px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  vertical-align: top;
  z-index: 1;
  background: var(--surface);
}

.calendar-cell:nth-child(7) {
  border-right: 0;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  table-layout: fixed;
  background: var(--surface);
  border: 1px solid var(--line);
}

.calendar-table th,
.calendar-table td {
  border: 1px solid var(--line);
  vertical-align: top;
}

.calendar-table th {
  padding: 10px;
  background: var(--surface-muted);
  font-size: 13px;
}

.calendar-table td {
  min-height: 128px;
  padding: 10px;
}

.calendar-day-number,
.calendar-day {
  font-weight: 700;
  color: var(--text);
}

.calendar-day-events {
  margin-top: calc(var(--range-space, 0px) + 8px);
}

.is-outside .calendar-day-number,
.is-outside .calendar-day,
.is-outside .mini-event {
  color: #9a9288;
}

.mini-events {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.mini-event {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.mini-label {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
}

.event-filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.event-filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.event-filter-link:hover {
  border-color: var(--teal);
  color: var(--teal);
  text-decoration: none;
}

.work-schedule-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.work-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.work-card-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.work-section {
  margin-top: 16px;
}

.work-section h3,
.section-title {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.4;
}

.section-title {
  margin-top: 32px;
}

.timeline {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(156px, 0.32fr) 1fr;
  gap: 16px;
  position: relative;
  padding: 0 0 14px 22px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: var(--surface);
  z-index: 1;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: 0;
  border-left: 1px solid #cfe1dd;
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-date {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.timeline-detail {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.timeline-label {
  color: var(--text);
  font-weight: 700;
}

.timeline-extra {
  color: var(--muted);
}

.timeline-item-range .timeline-label {
  color: #155f58;
}

.timeline-item-range::before {
  border-color: var(--teal);
  background: #e5f3ef;
}

.timeline-item-general .timeline-label {
  color: var(--accent);
}

.timeline-item-general::before {
  border-color: var(--accent);
  background: #fbe5ea;
}

.timeline-item-performance::before {
  border-color: var(--gold);
  background: #fff3d7;
}

.timeline-compact .timeline-item {
  padding-bottom: 10px;
}

.timeline-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.timeline-source-link:hover {
  border-color: var(--teal);
  color: var(--teal);
  text-decoration: none;
}

.event-categories {
  margin-top: 34px;
}

.event-category-section {
  scroll-margin-top: 84px;
  margin-top: 22px;
}

.event-category-title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-card {
  display: grid;
  grid-template-columns: minmax(132px, 0.34fr) 1fr;
  gap: 14px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 14px;
}

.event-card-general {
  border-left-color: var(--accent);
}

.event-card-presale {
  border-left-color: var(--blue);
}

.event-card-performance {
  border-left-color: var(--gold);
}

.event-card-past,
.event-card-history {
  background: #f6f3ee;
  border-left-color: #a99f94;
}

.event-card-date {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.event-card-past .event-card-date {
  color: #746d66;
}

.event-card-body {
  min-width: 0;
}

.event-card-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.event-card-label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.event-card-range .event-card-label {
  color: var(--teal);
}

.event-card-title {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.event-card-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.event-card-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.event-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.event-badge-history {
  background: #e5ded5;
  color: #6e6257;
}

.top-summary {
  display: grid;
  gap: 16px;
}

.top-summary-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.top-summary-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.top-summary-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.summary-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
}

.summary-section-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
}

.summary-card-alert {
  border-color: #f0b9c4;
  background: #fff7f8;
}

.summary-card-active {
  border-color: #cfe1dd;
  background: #f7fbf9;
}

.summary-card-past {
  background: #f7f4ef;
  color: #6f6861;
}

.summary-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-date {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.summary-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.summary-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.summary-link {
  width: fit-content;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.summary-link:hover {
  text-decoration: underline;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
}

.summary-badge-danger {
  background: #ffe0e6;
  color: #9d2440;
}

.summary-badge-warning {
  background: #fff3d7;
  color: #7a5418;
}

.summary-badge-active {
  background: #e1f1ed;
  color: #155f58;
}

.summary-badge-neutral {
  background: var(--surface-muted);
  color: var(--muted);
}

.summary-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-lottery-work {
  display: grid;
  gap: 7px;
}

.summary-lottery-work + .summary-lottery-work {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.summary-more {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-calendar-preview,
.home-work-list {
  display: grid;
  gap: 12px;
}

.home-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.home-section-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.home-section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-calendar-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.home-calendar-weekdays,
.home-calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.home-calendar-weekdays > div {
  padding: 8px 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.home-calendar-day {
  min-height: 94px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 7px;
  background: #fff;
}

.home-calendar-day:nth-child(7n) {
  border-right: 0;
}

.home-calendar-day.is-outside {
  background: #f7f4ef;
  color: var(--muted);
}

.home-calendar-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.home-calendar-events {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.home-calendar-event {
  display: block;
  overflow: hidden;
  border-radius: 5px;
  padding: 3px 5px;
  background: #eef3fb;
  color: #315f9c;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.home-calendar-event:hover {
  text-decoration: underline;
}

.home-calendar-event-lottery {
  background: #e1f1ed;
  color: #155f58;
}

.home-calendar-event-general {
  background: #fff3d7;
  color: #7a5418;
}

.home-calendar-event-result {
  background: #eef3fb;
  color: #315f9c;
}

.home-calendar-event-performance {
  background: #f7e8eb;
  color: #9d2440;
}

.home-calendar-more {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.home-calendar-link,
.home-work-link {
  width: fit-content;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.home-calendar-link:hover,
.home-work-link:hover {
  text-decoration: underline;
}

.home-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-work-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.home-work-cover-placeholder {
  display: grid;
  place-items: center;
  width: 54px;
  height: 70px;
  border-radius: 7px;
  background: linear-gradient(135deg, #e1f1ed, #fff3d7);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.home-work-body {
  min-width: 0;
}

.home-work-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.home-work-title a {
  color: var(--text);
  text-decoration: none;
}

.home-work-title a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.home-work-meta,
.home-work-next {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.home-work-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  margin-top: 7px;
  padding: 1px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
}

.home-work-badge-active {
  background: #e1f1ed;
  color: #155f58;
}

.home-work-badge-upcoming {
  background: #eef3fb;
  color: #315f9c;
}

.home-work-badge-general {
  background: #fff3d7;
  color: #7a5418;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.button:hover,
.text-link:hover {
  text-decoration: none;
}

.button-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: #99344a;
  color: #fff;
}

.button-secondary,
.text-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.button-secondary:hover,
.text-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82)),
    #fff;
  padding: 28px;
}

.home-hero-copy {
  min-width: 0;
}

.home-hero-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero-title {
  margin: 0;
  max-width: 720px;
  color: var(--text);
  font-size: 32px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-hero-lead {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.home-hero-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.home-section-header-main {
  margin-bottom: -4px;
}

.home-section-header-main h2,
.home-section-header h2 {
  font-size: 22px;
}

.summary-grid-home {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.summary-section {
  min-width: 0;
}

.summary-section-alert {
  border-color: #ead2d8;
  background: #fffafb;
}

.summary-section-head {
  margin-bottom: 10px;
}

.summary-section-head .summary-section-title {
  margin-bottom: 0;
}

.summary-card {
  min-width: 0;
}

.summary-link {
  min-height: 32px;
  align-items: center;
}

.home-calendar-mobile-list {
  display: none;
}

.home-calendar-mobile-day {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.home-calendar-mobile-date {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.home-calendar-mobile-events {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-work-card {
  min-width: 0;
}

.home-work-card-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.home-share-panel,
.status-panel-compact {
  margin-top: 22px;
}

.status-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-detail {
  display: grid;
  gap: 18px;
}

.work-detail-header,
.work-detail-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.work-detail-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}

.work-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.work-detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.important-summary {
  margin-top: 14px;
  border: 1px solid #cfe1dd;
  border-radius: 8px;
  background: #f7fbf9;
  padding: 14px;
}

.important-summary h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.4;
}

.important-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.important-summary-list div {
  display: grid;
  gap: 3px;
}

.important-summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.important-summary-list dd {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.work-detail-nav a,
.back-link-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.work-detail-nav a:hover,
.back-link-list a:hover {
  border-color: var(--teal);
  color: var(--teal);
  text-decoration: none;
}

.work-detail-section {
  scroll-margin-top: 84px;
}

.work-detail-section h2 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.4;
}

.detail-subtitle {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.detail-subtitle:first-of-type {
  margin-top: 0;
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.summary-list div {
  display: grid;
  gap: 2px;
}

.summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.detail-timeline {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.detail-timeline-item {
  display: grid;
  grid-template-columns: minmax(168px, 0.32fr) 1fr;
  gap: 16px;
  position: relative;
  padding: 0 0 14px 22px;
}

.detail-timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: var(--surface);
  z-index: 1;
}

.detail-timeline-item::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: 0;
  border-left: 1px solid #cfe1dd;
}

.detail-timeline-item:last-child::after {
  display: none;
}

.detail-timeline-date {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.detail-timeline-body {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-timeline-label {
  color: var(--text);
  font-weight: 700;
}

.detail-timeline-item-range .detail-timeline-label {
  color: var(--teal);
}

.detail-timeline-item-general .detail-timeline-label {
  color: var(--accent);
}

.detail-timeline-item-active .detail-timeline-label,
.detail-timeline-item-due_today .detail-timeline-label,
.detail-timeline-item-due_tomorrow .detail-timeline-label,
.detail-timeline-item-today .detail-timeline-label {
  font-weight: 800;
}

.timeline-group {
  margin-top: 18px;
}

.timeline-group:first-of-type {
  margin-top: 0;
}

.timeline-group-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  scroll-margin-top: 88px;
}

.timeline-group-empty {
  margin-top: 16px;
}

.schedule-group-list {
  display: grid;
  gap: 12px;
}

.schedule-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.schedule-group-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.schedule-group-date {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.schedule-group-purpose {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f2ece2;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.schedule-channel-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule-channel-item {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.schedule-channel-item:first-child {
  border-top: 0;
  padding-top: 2px;
}

.schedule-channel-item:last-child {
  padding-bottom: 0;
}

.schedule-channel-item-ended,
.schedule-channel-item-past {
  opacity: 0.74;
}

.schedule-channel-header,
.schedule-channel-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.schedule-channel-name {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.schedule-channel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.schedule-channel-time {
  color: var(--text);
  font-weight: 800;
}

.schedule-channel-note {
  color: #786c5e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  max-width: 100%;
}

.schedule-channel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
}

.schedule-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 7px;
  background: #eef6f0;
  color: #2f6d4f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.schedule-link-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--teal);
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--teal);
  background: #fff;
  text-decoration: none;
}

.schedule-link-button:hover {
  background: #e1f1ed;
  text-decoration: none;
}

.schedule-source-link {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.schedule-source-link:hover {
  color: var(--teal);
}

.detail-timeline-item-ended,
.detail-timeline-item-past {
  opacity: 0.72;
}

.detail-timeline-item-ended::before,
.detail-timeline-item-past::before {
  border-color: #b8afa5;
  background: #eee8df;
}

.detail-timeline-item-performance::before {
  border-color: var(--gold);
  background: #fff3d7;
}

.timeline-item-uncertain .detail-timeline-label {
  color: #7a5418;
}

.detail-timeline-item-uncertain::before,
.timeline-item-uncertain::before {
  border-color: #d8a437;
  background: #fff3d7;
}

.compact-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.schedule-note {
  color: #7a5418;
  font-weight: 700;
}

.schedule-target,
.schedule-channel,
.schedule-venue,
.schedule-source-text {
  color: var(--muted);
  font-weight: 700;
}

.schedule-channel {
  color: var(--text);
}

.status-badge {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
}

.status-active,
.status-today {
  background: #e1f1ed;
  color: #155f58;
}

.status-due_today,
.status-due_tomorrow {
  background: #ffe0e6;
  color: #9d2440;
}

.status-upcoming,
.status-upcoming_soon,
.status-tomorrow {
  background: #eef3fb;
  color: #315f9c;
}

.status-ended,
.status-past {
  background: #ebe5dc;
  color: #746d66;
}

.status-uncertain {
  background: #fff3d7;
  color: #7a5418;
}

.status-unknown {
  background: var(--surface-muted);
  color: var(--muted);
}

.status-page .status-badge {
  padding: 5px 11px;
  font-size: 12px;
  line-height: 1.4;
}

.detail-timeline-compact .detail-timeline-item {
  padding-bottom: 10px;
}

.ticket-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ticket-link-group {
  align-items: stretch;
}

.ticket-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
}

.ticket-link-card:hover {
  border-color: var(--teal);
  color: var(--teal);
  text-decoration: none;
}

.ticket-link-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.data-source-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.data-source-box p {
  margin: 0;
}

.back-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.events-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.events-table th,
.events-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.events-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 700;
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
    overflow-x: hidden;
  }

  .header-inner,
  .page-shell {
    width: min(1120px, calc(100% - 24px));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding: 12px 0;
  }

  .brand {
    font-size: 16px;
    line-height: 1.35;
  }

  .nav {
    width: 100%;
    gap: 6px;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  .page-shell {
    padding: 18px 0 36px;
  }

  .page-title {
    font-size: 24px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    padding: 18px;
  }

  .home-hero-title {
    font-size: 18px;
    line-break: anywhere;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .home-hero-lead {
    font-size: 14px;
  }

  .home-hero-actions {
    justify-content: stretch;
    width: 100%;
  }

  .button,
  .text-link {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 9px 13px;
    font-size: 14px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .top-summary-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-section {
    padding: 12px;
  }

  .summary-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .summary-card {
    padding: 11px;
  }

  .home-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-section-header h2,
  .home-section-header-main h2 {
    font-size: 20px;
  }

  .home-calendar-preview {
    gap: 10px;
  }

  .home-calendar-mobile-list {
    display: grid;
    gap: 8px;
  }

  .home-calendar-grid {
    display: none;
  }

  .home-calendar-mobile-day {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .home-calendar-day {
    min-height: 82px;
    padding: 5px;
  }

  .home-calendar-event {
    font-size: 10px;
  }

  .home-work-grid {
    grid-template-columns: 1fr;
  }

  .home-work-card {
    grid-template-columns: 46px 1fr;
    gap: 10px;
    padding: 11px;
  }

  .home-work-cover-placeholder {
    width: 46px;
    height: 58px;
  }

  .home-share-panel {
    display: none;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-grid-compact {
    grid-template-columns: 1fr;
  }

  .status-panel-compact {
    padding: 14px;
  }

  .status-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-table {
    font-size: 12px;
  }

  .calendar-table td {
    padding: 8px;
  }

  .calendar-weekday-row {
    font-size: 12px;
  }

  .calendar-weekday-row > div,
  .calendar-cell {
    padding: 7px;
  }

  .calendar-week-grid {
    min-height: calc(116px + var(--range-space, 0px));
  }

  .calendar-cell {
    min-height: calc(116px + var(--range-space, 0px));
  }

  .calendar-range-segment {
    margin: calc(28px + var(--range-row-offset, 0px)) 2px 0;
    padding: 4px 6px;
    font-size: 11px;
  }

  .calendar-day-events {
    margin-top: calc(var(--range-space, 0px) + 7px);
  }

  .work-card {
    padding: 14px;
  }

  .work-card-header {
    display: grid;
  }

  .work-card-title {
    font-size: 18px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 20px;
  }

  .timeline-date,
  .timeline-detail {
    font-size: 12px;
  }

  .timeline-source-link {
    width: fit-content;
  }

  .event-filter-nav {
    gap: 6px;
    padding: 8px;
  }

  .event-filter-link {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .event-card-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .event-card-title {
    font-size: 14px;
  }

  .work-detail-header,
  .work-detail-section {
    padding: 14px;
  }

  .work-detail-title {
    font-size: 24px;
  }

  .important-summary {
    padding: 12px;
  }

  .important-summary-list {
    grid-template-columns: 1fr;
  }

  .summary-list,
  .ticket-link-list {
    grid-template-columns: 1fr;
  }

  .detail-timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 20px;
  }

  .detail-timeline-date,
  .detail-timeline-body {
    font-size: 12px;
  }
}
