:root {
  --bg: #fff7fb;
  --panel: #ffffff;
  --ink: #2c2530;
  --muted: #756877;
  --pink: #ff6fae;
  --mint: #33c7ae;
  --blue: #6aa9ff;
  --yellow: #ffd463;
  --danger: #b70025;
  --line: rgba(44, 37, 48, 0.13);
  --shadow: 0 18px 45px rgba(155, 79, 123, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 111, 174, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(51, 199, 174, 0.07) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 72px;
}

.hero {
  min-height: 48vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 36px;
}

.hero-copy {
  padding: 24px 0;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 11vw, 7.8rem);
  line-height: 0.86;
  color: #2f2130;
  text-shadow: 4px 4px 0 rgba(255, 111, 174, 0.22);
}

.lead {
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.restore-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}

.primary-btn {
  background: var(--ink);
  color: white;
  box-shadow: 0 12px 30px rgba(44, 37, 48, 0.18);
}

.ghost-btn,
.restore-btn {
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.restore-btn {
  border-color: rgba(183, 0, 37, 0.35);
  color: var(--danger);
  animation: breathe 1.5s ease-in-out infinite;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 8px solid #fff;
  border-radius: 8px;
  background: #f7dbe8;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(1.08) contrast(0.98);
}

.photo-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.85);
  color: #6c5068;
  font-size: 0.78rem;
  font-weight: 700;
}

.face-mark {
  position: absolute;
  opacity: 0;
  border: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(162deg, transparent 0 5px, rgba(154, 0, 24, 0.96) 5px 10px, transparent 10px 14px),
    repeating-linear-gradient(25deg, transparent 0 6px, rgba(211, 0, 38, 0.84) 6px 11px, transparent 11px 17px);
  filter: saturate(1.2) contrast(1.2);
  mix-blend-mode: multiply;
  transition: opacity 300ms ease;
}

.mark-a {
  width: 17%;
  height: 22%;
  left: 38%;
  top: 21%;
  border-radius: 48% 52% 43% 57%;
  transform: rotate(-8deg);
}

.mark-b {
  width: 19%;
  height: 24%;
  left: 58%;
  top: 20%;
  border-radius: 48% 43% 52% 41%;
  transform: rotate(7deg);
}

.mark-b::before,
.mark-b::after {
  content: "";
  position: absolute;
  inset: 10% -8%;
  border-radius: 50%;
  background: rgba(185, 0, 30, 0.82);
  transform: rotate(-18deg);
}

.mark-b::after {
  inset: 28% -16% 24% -10%;
  background: rgba(118, 0, 20, 0.78);
  transform: rotate(24deg);
}

.profile-band,
.content-grid {
  margin-top: 28px;
}

.post-entry {
  margin-top: 18px;
  padding: 18px;
}

.profile-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-main h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
}

.profile-main p:last-child {
  max-width: 660px;
  color: var(--muted);
  line-height: 1.9;
}

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

.member-card {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.member-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--tone);
}

.member-card strong,
.member-card small {
  display: block;
}

.member-card small {
  margin-top: 4px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.news-panel,
.calendar-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(155, 79, 123, 0.1);
}

.news-panel {
  padding: 18px;
}

.section-head,
.calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head span {
  color: #b2a4ad;
  font-size: 0.72rem;
  font-weight: 800;
}

.post-list {
  display: grid;
  gap: 8px;
}

.schedule-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  margin: 12px 0 0 auto;
  border: 0;
  border-bottom: 1px dotted rgba(117, 104, 119, 0.55);
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
  color: #8e7d89;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.schedule-link:hover {
  color: var(--danger);
  border-bottom-color: rgba(183, 0, 37, 0.55);
}

.post-row {
  width: 100%;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(44, 37, 48, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #574a58;
  text-align: left;
  cursor: pointer;
}

.post-row:hover,
.read-post {
  border-color: rgba(255, 111, 174, 0.34);
  background: #fff8fb;
}

.post-row span,
.post-row em {
  color: #a1949e;
  font-size: 0.75rem;
  font-style: normal;
}

.post-row strong {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.calendar-panel {
  padding: 18px;
}

.calendar-panel[hidden],
.schedule-link[hidden] {
  display: none;
}

.calendar-top h2 {
  margin: 0;
  font-size: 1.9rem;
}

.restore-status {
  margin: 6px 0 0;
  color: #9b8995;
  font-size: 0.82rem;
  font-weight: 800;
}

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

.week-row {
  margin-top: 16px;
  color: #a18f9f;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.week-row span {
  padding: 8px 0;
}

.calendar-grid {
  gap: 6px;
}

.day-cell {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid rgba(44, 37, 48, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.day-cell.blank {
  visibility: hidden;
  pointer-events: none;
}

.day-number {
  display: block;
  margin-bottom: 8px;
  color: #77636f;
  font-size: 0.82rem;
  font-weight: 800;
}

.event-stack {
  display: grid;
  gap: 5px;
}

.event-pill {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  padding: 5px 6px;
  background: rgba(255, 111, 174, 0.14);
  color: #75415b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.deleted-pill {
  background: #11080d;
  color: #ffccd9;
  text-shadow: 1px 0 #b70025;
}

.hidden-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38px;
  height: 38px;
  border-top-left-radius: 100%;
  background: transparent;
  opacity: 0;
}

.selected {
  border-color: rgba(183, 0, 37, 0.42);
  animation: cellStatic 420ms steps(2, end);
}

.checkmark {
  position: absolute;
  right: 7px;
  bottom: 4px;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 900;
}

.restored {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(28, 6, 13, 0.08));
}

.drawer {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  width: min(460px, calc(100% - 36px));
  max-height: min(680px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 70px rgba(44, 37, 48, 0.24);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.drawer[aria-hidden="false"] {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2edf0;
  cursor: pointer;
  font-size: 1.2rem;
}

.drawer-date,
.drawer-place {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.drawer h2 {
  padding-right: 32px;
}

.drawer-body p {
  color: #52454e;
  line-height: 1.85;
}

.post-drawer {
  border-color: rgba(255, 111, 174, 0.3);
}

.post-drawer .drawer-body p:last-child {
  border-left: 3px solid rgba(255, 111, 174, 0.48);
  padding-left: 12px;
  color: #7e5870;
}

.event-visual {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(140px, 0.75fr);
  gap: 12px;
  margin: 6px 0 18px;
}

.mini-flyer,
.mini-map {
  min-height: 138px;
  overflow: hidden;
  border: 1px solid rgba(44, 37, 48, 0.12);
  border-radius: 8px;
}

.mini-flyer {
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 111, 174, 0.42), transparent 30%),
    linear-gradient(135deg, rgba(51, 199, 174, 0.2), rgba(255, 212, 99, 0.2)),
    #fff7fb;
}

.mini-flyer span,
.mini-flyer small {
  color: #8d6b80;
  font-size: 0.74rem;
  font-weight: 900;
}

.mini-flyer strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.mini-map {
  position: relative;
  background: #f4f1ea;
}

.road {
  position: absolute;
  display: block;
  background: #d8d0c5;
}

.road-a {
  width: 120%;
  height: 18px;
  left: -10%;
  top: 32%;
  transform: rotate(-12deg);
}

.road-b {
  width: 18px;
  height: 120%;
  left: 48%;
  top: -10%;
  transform: rotate(8deg);
}

.road-c {
  width: 82%;
  height: 14px;
  left: 10%;
  top: 68%;
}

.venue-pin {
  position: absolute;
  left: 54%;
  top: 44%;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 4px 16px rgba(44, 37, 48, 0.28);
}

.deleted-drawer {
  border-color: rgba(183, 0, 37, 0.5);
  background:
    linear-gradient(135deg, rgba(183, 0, 37, 0.2), transparent 38%),
    #100407;
  color: #ff2d4f;
}

.deleted-drawer .drawer-date,
.deleted-drawer .drawer-place {
  color: #ff506a;
}

.deleted-drawer .drawer-close {
  background: #2b1018;
  color: white;
}

.deleted-drawer .drawer-body p {
  color: #ff334f;
  text-shadow: 0 0 10px rgba(255, 0, 48, 0.22);
}

.noise,
.flash {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
}

.noise {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(183, 0, 37, 0.12), transparent 2px, rgba(0, 0, 0, 0.14) 4px);
  mix-blend-mode: difference;
}

.flash {
  background: rgba(183, 0, 37, 0.42);
}

.photo-wrong .mark-b {
  opacity: 0.88;
}

.ending-armed .mark-b {
  cursor: pointer;
  pointer-events: auto;
  animation: faceBreathe 1.6s ease-in-out infinite;
}

.site-unsafe {
  --bg: #0b0507;
  --panel: #13080d;
  --ink: #ffe8ef;
  --muted: #d994a5;
  --line: rgba(255, 155, 179, 0.18);
}

.site-unsafe .hero h1 {
  color: #ffe8ef;
  text-shadow: 3px 0 #b70025, -2px 0 #115b55;
}

.site-unsafe .news-panel,
.site-unsafe .calendar-panel,
.site-unsafe .member-card {
  background: rgba(18, 7, 12, 0.86);
}

.site-unsafe .post-row,
.site-unsafe .day-cell {
  background: rgba(255, 232, 239, 0.06);
  color: #ffe8ef;
}

.fx-soft .flash,
.fx-hard .flash,
.fx-darken .flash,
.fx-blood .flash,
.fx-final .flash {
  animation: flash 720ms ease;
}

.fx-glitch .noise,
.fx-stain .noise,
.fx-final .noise {
  animation: glitch 680ms steps(2, end);
}

.fx-glitch .flash {
  background: rgba(255, 255, 255, 0.28);
  animation: flash 360ms steps(2, end);
}

.fx-blood .flash,
.fx-final .flash {
  background: rgba(183, 0, 37, 0.58);
}

.fx-darken .flash {
  background: rgba(0, 0, 0, 0.58);
}

.news-page {
  min-height: 100vh;
  padding: 34px 18px 80px;
  background: #f1eee9;
  color: #191919;
}

.article {
  width: min(780px, 100%);
  margin: 0 auto;
  border-top: 6px solid #191919;
  padding-top: 18px;
}

.paper-name {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 800;
}

.article-date {
  color: #666;
  font-size: 0.86rem;
}

.article h1 {
  margin: 18px 0;
  font-size: clamp(2rem, 7vw, 4.2rem);
  line-height: 1.08;
}

.article-lead {
  border-top: 1px solid #bbb;
  border-bottom: 1px solid #bbb;
  padding: 16px 0;
  font-weight: 800;
  line-height: 1.8;
}

.article p {
  line-height: 2;
}

.reset-btn {
  margin-top: 24px;
}

.error-page {
  padding: 40px;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(183, 0, 37, 0);
  }
  50% {
    box-shadow: 0 0 22px rgba(183, 0, 37, 0.22);
  }
}

@keyframes flash {
  0%,
  100% {
    opacity: 0;
  }
  18%,
  42% {
    opacity: 1;
  }
}

@keyframes glitch {
  0%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
  10%,
  70% {
    opacity: 0.8;
    transform: translate(6px, -2px);
  }
  30% {
    transform: translate(-8px, 4px);
  }
}

@keyframes cellStatic {
  0%,
  100% {
    transform: translate(0, 0);
  }
  40% {
    transform: translate(1px, -1px);
    filter: contrast(1.4);
  }
  70% {
    transform: translate(-1px, 1px);
  }
}

@keyframes faceBreathe {
  0%,
  100% {
    opacity: 0.76;
  }
  50% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 0 10px rgba(183, 0, 37, 0.55));
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 22px, 680px);
    padding-top: 14px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 26px 0 8px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 20vw, 5.8rem);
  }

  .photo-frame {
    transform: none;
  }

  .profile-band,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .calendar-panel {
    padding: 12px;
  }

  .calendar-grid {
    gap: 4px;
  }

  .day-cell {
    min-height: 86px;
    padding: 6px;
  }

  .event-pill {
    padding: 4px;
    font-size: 0.64rem;
  }
}

@media (max-width: 520px) {
  .member-grid {
    grid-template-columns: 1fr;
  }

  .post-row {
    grid-template-columns: 1fr;
  }

  .calendar-top {
    align-items: flex-start;
  }

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

  .week-row,
  .calendar-grid {
    min-width: 640px;
  }

  .calendar-panel {
    overflow-x: auto;
  }

  .drawer {
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
  }
}
