:root {
  --navy: #092a49;
  --blue: #1479b8;
  --sky: #eaf7ff;
  --yellow: #ffd84d;
  --orange: #ff9f1c;
  --green: #24a36b;
  --text: #17324a;
  --muted: #63798c;
  --shadow: 0 18px 50px rgba(9, 42, 73, 0.15);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 216, 77, 0.24), transparent 22rem),
    radial-gradient(circle at 90% 20%, rgba(36, 163, 107, 0.15), transparent 26rem),
    linear-gradient(160deg, #f9fdff, var(--sky));
  font-family: "UD Shin Go Conde90 M", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

button, input, textarea { font: inherit; }

.cheer-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(9, 42, 73, 0.08);
  backdrop-filter: blur(16px);
}

.cheer-header__brand {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.cheer-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(9, 42, 73, 0.2);
  font-weight: 800;
  cursor: pointer;
}

.cheer-view-toggle:hover { transform: translateY(-1px); }
.cheer-view-toggle:focus-visible,
.cheer-card:focus-visible,
.cheer-dialog__close:focus-visible,
.cheer-submit:focus-visible { outline: 4px solid rgba(20, 121, 184, 0.3); outline-offset: 3px; }

.cheer-intro {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
  text-align: center;
}

.cheer-intro__eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.cheer-intro h1,
.cheer-form-card h1 {
  margin: 0.35rem 0 0;
  color: var(--navy);
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.2;
}

.cheer-intro > p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 700;
}

.cheer-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(1.1rem, 3vw, 2.3rem);
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 6rem;
}

.cheer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 1.35rem;
  color: var(--text);
  text-align: left;
  border: 0;
  border-radius: 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: rotate(var(--cheer-tilt));
  animation: cheerFloat var(--cheer-duration) ease-in-out var(--cheer-delay) infinite;
}

.cheer-card::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -16px;
  width: 34px;
  height: 30px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 12% 100%);
}

.cheer-card:hover { animation-play-state: paused; transform: translateY(-5px) rotate(0); }
.cheer-card--color-1 { background: #fff2b8; }
.cheer-card--color-2 { background: #dff4ff; }
.cheer-card--color-3 { background: #dcf7e9; }
.cheer-card--color-4 { background: #ffe4d1; }
.cheer-card--color-5 { background: #efe5ff; }
.cheer-card--color-6 { background: #ffe4ec; }

.cheer-card__title {
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cheer-card__excerpt {
  display: -webkit-box;
  margin: 0.8rem 0 1rem;
  color: #385166;
  line-height: 1.7;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cheer-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  color: #52687a;
  font-size: 0.8rem;
  font-weight: 800;
}

@keyframes cheerFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.cheer-board.is-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(920px, calc(100% - 2rem));
}

.cheer-board.is-list .cheer-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 2fr) minmax(110px, auto);
  align-items: center;
  gap: 1rem;
  min-height: 0;
  padding: 1rem 1.2rem;
  border-radius: 15px;
  transform: none;
  animation: none;
}

.cheer-board.is-list .cheer-card::after { display: none; }
.cheer-board.is-list .cheer-card__excerpt { margin: 0; -webkit-line-clamp: 1; }

.cheer-dialog {
  width: min(610px, calc(100% - 2rem));
  padding: clamp(1.5rem, 5vw, 3rem);
  color: var(--text);
  background: #fff;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 30px 100px rgba(9, 42, 73, 0.32);
}

.cheer-dialog::backdrop { background: rgba(4, 20, 34, 0.62); backdrop-filter: blur(4px); }
.cheer-dialog__close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  color: var(--navy);
  background: #edf6fc;
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
}
.cheer-dialog__eyebrow { color: var(--blue); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.16em; }
.cheer-dialog h2 { margin: 0.35rem 3rem 1rem 0; color: var(--navy); font-size: clamp(1.5rem, 5vw, 2.3rem); overflow-wrap: anywhere; }
.cheer-dialog__message { white-space: pre-wrap; line-height: 1.9; overflow-wrap: anywhere; }
.cheer-dialog__poster { margin: 1.5rem 0 0; color: var(--muted); font-weight: 800; text-align: right; }

.cheer-status {
  width: min(700px, calc(100% - 2rem));
  margin: 2rem auto;
  padding: 1.25rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 800;
}
.cheer-status--error { color: #a12735; }

.cheer-form-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem);
}

.cheer-form-card {
  width: min(680px, 100%);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.cheer-form-card h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.cheer-form-card__lead { margin: 0.9rem 0 2rem; color: var(--muted); font-weight: 700; }
.cheer-form { display: grid; gap: 1.35rem; }
.cheer-field { display: grid; gap: 0.55rem; }
.cheer-field > span { color: var(--navy); font-weight: 900; }
.cheer-field small { color: var(--muted); font-weight: 600; }
.cheer-field input,
.cheer-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  color: var(--text);
  background: #f8fcff;
  border: 2px solid #d7e9f4;
  border-radius: 13px;
  font-size: 16px;
  line-height: 1.6;
}
.cheer-field textarea { resize: vertical; }
.cheer-field input:focus,
.cheer-field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(20, 121, 184, 0.13); }
.cheer-field output { color: var(--muted); font-size: 0.78rem; text-align: right; }
.cheer-submit {
  padding: 1rem 1.5rem;
  color: var(--navy);
  background: var(--yellow);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(255, 159, 28, 0.22);
  font-weight: 900;
  cursor: pointer;
}
.cheer-submit:hover { transform: translateY(-2px); }
.cheer-form-notice { margin: 0 0 1.5rem; padding: 1rem 1.15rem; border-radius: 13px; font-weight: 700; }
.cheer-form-notice ul { margin: 0; padding-left: 1.3rem; }
.cheer-form-notice--success { color: #12633f; background: #ddf7e9; }
.cheer-form-notice--error { color: #912337; background: #ffe7ec; }
.cheer-form-notice a { color: inherit; font-weight: 900; }
.cheer-honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 769px) {
  .cheer-card {
    width: 100%;
    max-width: 320px;
    justify-self: center;
  }

  .cheer-board.is-list .cheer-card {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .cheer-header { min-height: 60px; }
  .cheer-header__brand { font-size: 0.95rem; }
  .cheer-view-toggle { padding: 0.6rem 0.85rem; }
  .cheer-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .cheer-card { min-height: 175px; padding: 1.05rem; border-radius: 19px; }
  .cheer-card__title { font-size: 1.02rem; }
  .cheer-card__excerpt { font-size: 0.9rem; }
  .cheer-board.is-list .cheer-card { grid-template-columns: 1fr auto; }
  .cheer-board.is-list .cheer-card__excerpt { grid-column: 1 / -1; grid-row: 2; }
  .cheer-board.is-list .cheer-card__meta { grid-column: 2; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
