*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --mf-bg: #ffffff;
  --mf-surface: #fcfbfd;
  --mf-text: #2c2838;
  --mf-muted: #726d84;
  --mf-sumire: #7b68ee;
  --mf-sumire-soft: #a29bd4;
  --mf-gold: #c2a463;
  --mf-line: rgba(162, 155, 212, 0.22);
  --mf-font: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 84px;
  background-color: var(--mf-bg);
  color: var(--mf-text);
  font-family: var(--mf-font);
  line-height: 1.6;
}

.mf-header {
  position: relative;
  overflow: hidden;
  padding: 38px 16px 22px;
  text-align: center;
  background:
    radial-gradient(ellipse 68% 85% at 50% 18%, rgba(162, 155, 212, 0.14) 0%, rgba(162, 155, 212, 0.04) 52%, transparent 78%),
    radial-gradient(ellipse 46% 60% at 72% 40%, rgba(194, 164, 99, 0.09) 0%, transparent 72%);
}

.mf-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 26% 36%, rgba(123, 104, 238, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.mf-header-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.mf-hero-daruma-bg {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-48%) rotate(5deg);
  width: 92px;
  height: 92px;
  object-fit: contain;
  opacity: 0.16;
  filter: saturate(0.68) brightness(1.14);
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.mf-hero-ornament {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mf-hero-line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 164, 99, 0.55));
}

.mf-hero-line--right {
  background: linear-gradient(90deg, rgba(194, 164, 99, 0.55), transparent);
}

.mf-hero-flower {
  width: 18px;
  height: 18px;
  color: var(--mf-sumire-soft);
  opacity: 0.9;
}

.mf-site-kicker,
.mf-site-title,
.mf-hero-subornament {
  position: relative;
  z-index: 2;
}

.mf-hero-subornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.mf-hero-subline {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(162, 155, 212, 0.35), transparent);
}

.mf-hero-sparkle {
  width: 10px;
  height: 10px;
  color: var(--mf-gold);
  opacity: 0.78;
}

@media (min-width: 768px) {
  .mf-header {
    padding: 48px 16px 26px;
  }
  .mf-hero-line {
    width: 52px;
  }
  .mf-hero-subline {
    width: 84px;
  }
  .mf-hero-daruma-bg {
    right: 44px;
    width: 126px;
    height: 126px;
    opacity: 0.17;
  }
}

.mf-site-kicker {
  margin: 0 0 4px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--mf-gold);
}

.mf-site-title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mf-text);
}

.mf-title-san {
  font-size: 0.54em;
  font-weight: 400;
  color: var(--mf-muted);
  letter-spacing: 0.04em;
  margin: 0 0.28em 0 0.1em;
  vertical-align: 0.06em;
}

.mf-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 16px 24px;
}

/* --- 本日の真綾さんファン（両端が背景に溶け込むフェード帯） --- */
.mf-today {
  position: relative;
  margin: 2px 0 26px;
  padding: 11px 14px;
  background: linear-gradient(
    90deg,
    rgba(162, 155, 212, 0) 0%,
    rgba(162, 155, 212, 0.055) 18%,
    rgba(194, 164, 99, 0.04) 82%,
    rgba(194, 164, 99, 0) 100%
  );
}

.mf-today::before,
.mf-today::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(162, 155, 212, 0.28) 18%,
    rgba(194, 164, 99, 0.26) 82%,
    transparent 100%
  );
  pointer-events: none;
}

.mf-today::before {
  top: 0;
}

.mf-today::after {
  bottom: 0;
}

.mf-today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.mf-today-title {
  margin: 0;
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--mf-gold);
}

.mf-today-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mf-today-item + .mf-today-item {
  margin-top: 2px;
}

.mf-today-btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 3px 4px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--mf-text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.mf-today-btn:hover,
.mf-today-btn:focus-visible {
  background: rgba(162, 155, 212, 0.09);
  color: var(--mf-sumire);
}

.mf-today-task {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.mf-today-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.2px solid var(--mf-sumire-soft);
  transform: translateY(-1px);
}

.mf-today-dot--active {
  background: var(--mf-sumire);
  border-color: var(--mf-sumire);
}

.mf-today-due {
  flex-shrink: 0;
  font-size: 0.71rem;
  font-variant-numeric: tabular-nums;
  color: var(--mf-muted);
  white-space: nowrap;
}

.mf-block + .mf-block {
  margin-top: 32px;
}

.mf-block-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(194, 164, 99, 0.45);
}

.mf-block-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.mf-block-sub {
  font-size: 0.72rem;
  color: var(--mf-muted);
  letter-spacing: 0.04em;
}

.mf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mf-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid var(--mf-line);
  align-items: start;
}

.mf-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.mf-date-year {
  font-size: 0.62rem;
  color: var(--mf-sumire-soft);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.mf-date-md {
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
}

.mf-date-range {
  font-size: 0.76rem;
  color: var(--mf-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.mf-date-day {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--mf-muted);
  margin-left: 1px;
}

.mf-kind-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  margin-top: 7px;
  border-radius: 50%;
  background: rgba(162, 155, 212, 0.09);
  color: var(--mf-sumire-soft);
}

.mf-kind-icon--gold {
  background: rgba(194, 164, 99, 0.11);
  color: rgba(194, 164, 99, 0.9);
}

.mf-kind-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mf-body {
  min-width: 0;
}

.mf-title {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.mf-title-link {
  color: var(--mf-text);
  text-decoration: none;
  transition: color 0.18s ease;
}

.mf-title-link:hover,
.mf-title-link:focus-visible {
  color: var(--mf-sumire);
}

.mf-title-prefix {
  display: block;
  font-size: 0.7rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--mf-muted);
  margin-bottom: 2px;
}

.mf-ext {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.72rem;
  color: var(--mf-sumire-soft);
  vertical-align: 1px;
}

.mf-venue {
  margin: 5px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--mf-muted);
}

.mf-detail-btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px 6px 9px;
  background: rgba(162, 155, 212, 0.045);
  border: 0;
  border-left: 2px solid var(--mf-sumire-soft);
  border-radius: 0 6px 6px 0;
  font-family: inherit;
  font-size: 0.73rem;
  line-height: 1.45;
  color: var(--mf-text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.mf-detail-btn--release {
  background: rgba(194, 164, 99, 0.045);
  border-left-color: rgba(194, 164, 99, 0.6);
  color: var(--mf-muted);
}

.mf-detail-btn:hover,
.mf-detail-btn:focus-visible {
  background: rgba(162, 155, 212, 0.11);
  border-left-color: var(--mf-sumire);
}

.mf-detail-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.mf-detail-cue {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--mf-sumire-soft);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mf-status {
  display: inline-block;
  font-size: 0.64rem;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mf-status--upcoming {
  background: rgba(123, 104, 238, 0.12);
  color: var(--mf-sumire);
}

.mf-status--soon {
  background: rgba(194, 164, 99, 0.16);
  color: #8f7232;
}

/* --- 下部Xポスト埋め込みギャラリー --- */
.mf-x-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

.mf-x-card {
  height: 360px;
  overflow-y: auto;
  padding: 8px;
  background: var(--mf-surface);
  border: 1px solid var(--mf-line);
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(162, 155, 212, 0.45) transparent;
}

.mf-x-card::-webkit-scrollbar {
  width: 5px;
}

.mf-x-card::-webkit-scrollbar-thumb {
  background: rgba(162, 155, 212, 0.45);
  border-radius: 999px;
}

.mf-x-card .twitter-tweet {
  margin: 0 auto !important;
}

/* --- 詳細モーダル --- */
.mf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(44, 40, 56, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.mf-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mf-modal {
  position: relative;
  width: min(100%, 460px);
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  background: #ffffff;
  border: 1px solid rgba(162, 155, 212, 0.38);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(44, 40, 56, 0.16);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.mf-modal-backdrop.is-open .mf-modal {
  transform: translateY(0) scale(1);
}

.mf-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--mf-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mf-modal-close:hover {
  background: rgba(162, 155, 212, 0.12);
  color: var(--mf-text);
}

.mf-modal-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--mf-gold);
}

.mf-modal-title {
  margin: 0 28px 12px 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--mf-text);
}

.mf-modal-body {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--mf-text);
  padding-top: 12px;
  border-top: 1px solid var(--mf-line);
}

.mf-modal-body ul {
  margin: 0;
  padding-left: 18px;
}

.mf-modal-body li + li {
  margin-top: 6px;
}

.mf-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mf-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  font-size: 0.76rem;
  color: var(--mf-sumire);
  background: rgba(123, 104, 238, 0.08);
  border: 1px solid rgba(162, 155, 212, 0.35);
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.mf-modal-link:hover {
  background: rgba(123, 104, 238, 0.15);
}

.mf-footer {
  max-width: 760px;
  margin: 16px auto 0;
  padding: 16px;
  text-align: center;
}

.mf-footer-note {
  margin: 0;
  font-size: 0.7rem;
  color: var(--mf-muted);
}

@media (min-width: 640px) {
  .mf-header {
    padding: 32px 20px 16px;
  }

  .mf-site-title {
    font-size: 1.45rem;
  }

  .mf-today {
    padding: 12px 22px;
    margin-bottom: 30px;
  }

  .mf-item {
    grid-template-columns: 84px 1fr;
    gap: 18px;
    padding: 16px 4px;
  }

  .mf-date-year {
    font-size: 0.65rem;
  }

  .mf-date-md {
    font-size: 1rem;
  }

  .mf-date-range {
    font-size: 0.82rem;
  }

  .mf-date-day {
    font-size: 0.65rem;
  }

  .mf-kind-icon {
    width: 26px;
    height: 26px;
    margin-top: 8px;
  }

  .mf-kind-icon svg {
    width: 15px;
    height: 15px;
  }

  .mf-title {
    font-size: 0.94rem;
  }

  .mf-title-prefix {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin-bottom: 0;
    margin-right: 0.3em;
  }

  .mf-detail-btn {
    background: transparent;
    padding: 4px 6px 4px 9px;
  }

  .mf-x-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  body {
    padding-top: 64px;
    padding-bottom: 40px;
  }
}
