:root {
  --bg: #f7efe4;
  --bg-strong: #ecddc6;
  --surface: rgba(255, 248, 240, 0.78);
  --surface-strong: rgba(255, 248, 240, 0.92);
  --line: rgba(83, 55, 34, 0.12);
  --line-strong: rgba(83, 55, 34, 0.22);
  --text: #2b1f16;
  --text-muted: #6f5a48;
  --accent: #af3c2f;
  --accent-deep: #7f231b;
  --gold: #be8b3f;
  --green: #3e7654;
  --shadow: 0 20px 60px rgba(82, 53, 24, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(190, 139, 63, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(175, 60, 47, 0.18), transparent 35%),
    linear-gradient(180deg, #f6ede1 0%, #f2e8d9 50%, #efe3d0 100%);
  font-family: "Outfit", sans-serif;
}

.public-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(233, 170, 178, 0.34), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(182, 214, 160, 0.36), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(250, 210, 157, 0.28), transparent 30%),
    linear-gradient(180deg, #f8f5ea 0%, #eef4e2 34%, #f6ead8 72%, #f8f1e5 100%);
}

.public-page::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.54), transparent 0 22%),
    radial-gradient(circle at 82% 10%, rgba(255, 225, 214, 0.28), transparent 0 18%),
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 64px,
      rgba(123, 146, 88, 0.04) 64px,
      rgba(123, 146, 88, 0.04) 65px
    );
  opacity: 1;
}

.public-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 74%, rgba(237, 190, 175, 0.18), transparent 0 18%),
    radial-gradient(circle at 84% 82%, rgba(172, 205, 145, 0.2), transparent 0 16%);
  z-index: 0;
}

.sakura-scene {
  position: fixed;
  left: 0;
  bottom: 0;
  width: min(30vw, 380px);
  height: min(58vh, 640px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.sakura-scene::before {
  content: "";
  position: absolute;
  left: 58px;
  bottom: 316px;
  width: 116px;
  height: 90px;
  border-radius: 60% 40% 46% 54% / 52% 44% 56% 48%;
  background:
    radial-gradient(circle at 26% 34%, rgba(216, 237, 177, 0.52), transparent 0 32%),
    radial-gradient(circle at 62% 44%, rgba(189, 221, 146, 0.68), transparent 0 46%),
    radial-gradient(circle at 52% 72%, rgba(245, 212, 203, 0.34), transparent 0 52%);
  filter: blur(1px);
}

.sakura-scene::after {
  content: "";
  position: absolute;
  left: 112px;
  bottom: 368px;
  width: 86px;
  height: 72px;
  border-radius: 58% 42% 52% 48% / 44% 52% 48% 56%;
  background:
    radial-gradient(circle at 46% 36%, rgba(209, 232, 165, 0.64), transparent 0 48%),
    radial-gradient(circle at 62% 68%, rgba(244, 205, 199, 0.22), transparent 0 52%);
  filter: blur(0.6px);
}

.sakura-trunk {
  position: absolute;
  left: 66px;
  bottom: 54px;
  width: 30px;
  height: 288px;
  border-radius: 22px 22px 12px 12px;
  background:
    linear-gradient(90deg, rgba(96, 68, 48, 0.98), rgba(140, 103, 76, 0.92) 56%, rgba(86, 61, 44, 0.98));
  box-shadow:
    inset 10px 0 14px rgba(255, 255, 255, 0.08),
    10px 18px 32px rgba(105, 88, 74, 0.16);
}

.sakura-trunk::before,
.sakura-trunk::after {
  content: "";
  position: absolute;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(124, 88, 67, 0.96), rgba(88, 61, 45, 0.95));
  transform-origin: bottom center;
}

.sakura-trunk::before {
  left: 10px;
  top: -84px;
  width: 14px;
  height: 126px;
  transform: rotate(-16deg);
}

.sakura-trunk::after {
  left: 14px;
  top: -146px;
  width: 12px;
  height: 176px;
  border-radius: 18px;
  transform: rotate(20deg);
}

.sakura-ground {
  position: absolute;
  left: -24px;
  bottom: -12px;
  width: 274px;
  height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(203, 225, 172, 0.42), rgba(178, 210, 147, 0.18) 54%, transparent 80%);
  filter: blur(2px);
}

.sakura-ground::before,
.sakura-ground::after {
  content: "";
  position: absolute;
  bottom: 26px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(248, 226, 228, 0.92), transparent 0 12%),
    radial-gradient(circle at 34% 46%, rgba(243, 191, 198, 0.9), transparent 0 11%),
    radial-gradient(circle at 52% 58%, rgba(248, 226, 228, 0.92), transparent 0 12%),
    radial-gradient(circle at 70% 44%, rgba(241, 184, 193, 0.88), transparent 0 11%),
    radial-gradient(circle at 84% 54%, rgba(248, 226, 228, 0.92), transparent 0 12%),
    rgba(177, 209, 146, 0.06);
  filter: blur(0.2px);
}

.sakura-ground::before {
  left: 40px;
  width: 76px;
  height: 16px;
  transform: rotate(-6deg);
}

.sakura-ground::after {
  right: 54px;
  width: 92px;
  height: 18px;
  transform: rotate(4deg);
}

.sakura-haze {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 226, 166, 0.32), transparent 72%);
}

.sakura-haze-a {
  left: 18px;
  bottom: 214px;
  width: 220px;
  height: 220px;
}

.sakura-haze-b {
  left: 96px;
  bottom: 286px;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(243, 200, 194, 0.18), transparent 74%);
}

.sakura-branch {
  position: absolute;
  left: 76px;
  bottom: 308px;
  width: 102px;
  height: 254px;
  transform-origin: top center;
  animation: sway-sakura var(--branch-duration, 7.8s) ease-in-out infinite;
  animation-delay: var(--branch-delay, 0s);
}

.sakura-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(117, 90, 71, 0.78), rgba(117, 90, 71, 0.16));
}

.sakura-branch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 50px;
  height: 214px;
  transform: translateX(-50%);
  border-radius: 48% 52% 36% 64% / 10% 10% 90% 90%;
  background:
    linear-gradient(180deg, rgba(196, 223, 157, 0.94), rgba(145, 188, 104, 0.82) 56%, rgba(104, 144, 76, 0.2) 100%),
    radial-gradient(circle at 24% 12%, rgba(248, 227, 230, 0.84), transparent 0 10%),
    radial-gradient(circle at 72% 34%, rgba(244, 198, 204, 0.76), transparent 0 10%),
    radial-gradient(circle at 40% 72%, rgba(248, 227, 230, 0.78), transparent 0 9%);
  filter: blur(0.2px);
  opacity: 0.92;
  animation: sakura-bloom-wave var(--leaf-duration, 6.8s) ease-in-out infinite;
  animation-delay: var(--leaf-delay, 0s);
  box-shadow: 0 8px 22px rgba(113, 150, 82, 0.12);
}

.sakura-branch-1 {
  left: 14px;
  height: 220px;
}

.sakura-branch-1::after {
  width: 44px;
  height: 180px;
}

.sakura-branch-2 {
  left: 38px;
  height: 252px;
}

.sakura-branch-2::after {
  width: 52px;
  height: 210px;
}

.sakura-branch-3 {
  left: 62px;
  height: 276px;
}

.sakura-branch-3::after {
  width: 58px;
  height: 232px;
}

.sakura-branch-4 {
  left: 88px;
  height: 244px;
}

.sakura-branch-4::after {
  width: 52px;
  height: 202px;
}

.sakura-branch-5 {
  left: 108px;
  height: 212px;
}

.sakura-branch-5::after {
  width: 44px;
  height: 172px;
}

@keyframes sway-sakura {
  0%,
  100% {
    transform: rotate(var(--sway-start, 5deg));
  }

  50% {
    transform: rotate(var(--sway-end, -3deg)) translate3d(var(--branch-drift-x, 0px), var(--branch-drift-y, 4px), 0);
  }
}

@keyframes sakura-bloom-wave {
  0%,
  100% {
    transform: translateX(-50%) translate3d(0, 0, 0) scaleY(1);
    opacity: 0.92;
  }

  50% {
    transform: translateX(calc(-50% + var(--leaf-shift-x, 8px))) translate3d(0, var(--leaf-shift-y, 6px), 0) scaleY(1.03);
    opacity: 1;
  }
}

.distant-ridges {
  position: fixed;
  inset: auto 0 0 0;
  height: min(24vh, 220px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.78;
}

.ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.ridge-back {
  height: 180px;
  clip-path: polygon(0 100%, 0 74%, 12% 52%, 24% 66%, 38% 40%, 52% 60%, 66% 34%, 78% 56%, 90% 38%, 100% 62%, 100% 100%);
  background: linear-gradient(180deg, rgba(171, 191, 161, 0.14), rgba(150, 176, 142, 0.26));
}

.ridge-mid {
  height: 156px;
  clip-path: polygon(0 100%, 0 72%, 10% 58%, 22% 68%, 34% 44%, 48% 62%, 61% 40%, 72% 58%, 86% 42%, 100% 64%, 100% 100%);
  background: linear-gradient(180deg, rgba(127, 154, 116, 0.18), rgba(112, 140, 102, 0.34));
}

.ridge-front {
  height: 126px;
  clip-path: polygon(0 100%, 0 78%, 16% 62%, 28% 74%, 42% 52%, 56% 70%, 70% 48%, 82% 64%, 92% 54%, 100% 72%, 100% 100%);
  background: linear-gradient(180deg, rgba(108, 132, 95, 0.22), rgba(91, 117, 79, 0.42));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 56px,
      rgba(130, 96, 59, 0.03) 56px,
      rgba(130, 96, 59, 0.03) 57px
    );
  opacity: 0.7;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.hero-panel,
.card-surface,
.match-card,
.team-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 42px;
  position: relative;
  overflow: hidden;
}

.season-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 244, 238, 0.95), rgba(240, 248, 226, 0.9));
  border: 1px solid rgba(153, 117, 92, 0.14);
  color: #8c574a;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -32px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(190, 139, 63, 0.2) 0%, transparent 70%);
}

.public-page .page-shell {
  padding-top: 36px;
}

.public-page .hero-copy,
.public-page .hero-panel,
.public-page .match-card,
.public-page .team-card,
.public-page .card-surface {
  border: 1px solid rgba(120, 132, 89, 0.14);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.82), rgba(247, 250, 239, 0.72));
  box-shadow:
    0 28px 70px rgba(102, 116, 72, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.public-page .hero {
  gap: 28px;
  align-items: stretch;
}

.public-page .hero-copy {
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(255, 250, 244, 0.94), rgba(244, 250, 236, 0.84)),
    radial-gradient(circle at 82% 18%, rgba(243, 190, 189, 0.24), transparent 0 22%),
    radial-gradient(circle at 20% 92%, rgba(192, 216, 164, 0.24), transparent 0 28%);
}

.public-page .hero-copy::after {
  right: -18px;
  top: -14px;
  width: 260px;
  height: 260px;
  background:
    radial-gradient(circle, rgba(239, 179, 180, 0.28) 0%, rgba(239, 179, 180, 0.08) 36%, transparent 68%);
}

.public-page .hero-panel {
  background:
    linear-gradient(180deg, rgba(244, 249, 235, 0.9), rgba(255, 247, 239, 0.84)),
    radial-gradient(circle at 80% 20%, rgba(243, 204, 170, 0.18), transparent 0 24%);
}

.hero-blossoms {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.petal {
  position: absolute;
  border-radius: 70% 30% 64% 36% / 43% 62% 38% 57%;
  background: linear-gradient(135deg, rgba(255, 232, 236, 0.95), rgba(240, 184, 193, 0.72));
  box-shadow: inset -6px -8px 18px rgba(208, 118, 135, 0.16);
  opacity: 0.82;
  animation: float-petal 9s ease-in-out infinite;
}

.petal-a {
  width: 88px;
  height: 54px;
  right: 96px;
  top: 56px;
  transform: rotate(26deg);
  animation-delay: 0s;
}

.petal-b {
  width: 60px;
  height: 38px;
  right: 52px;
  top: 112px;
  transform: rotate(-14deg);
  animation-delay: 1.2s;
}

.petal-c {
  width: 78px;
  height: 48px;
  right: 148px;
  bottom: 42px;
  transform: rotate(-22deg);
  animation-delay: 2.1s;
}

.petal-d {
  width: 52px;
  height: 34px;
  right: 26px;
  bottom: 96px;
  transform: rotate(34deg);
  animation-delay: 3.2s;
}

@keyframes float-petal {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--petal-rotate, 0deg));
  }

  50% {
    transform: translate3d(-10px, 12px, 0) rotate(calc(var(--petal-rotate, 0deg) + 10deg));
  }
}

.petal-a {
  --petal-rotate: 26deg;
}

.petal-b {
  --petal-rotate: -14deg;
}

.petal-c {
  --petal-rotate: -22deg;
}

.petal-d {
  --petal-rotate: 34deg;
}

.public-page .eyebrow,
.public-page .section-kicker {
  color: #8d5e48;
}

.public-page .hero h1,
.public-page .section-heading h2,
.public-page .match-card h3,
.public-page .team-card h3 {
  color: #28361f;
}

.public-page .hero-text,
.public-page .team-head p,
.public-page .team-description,
.public-page .match-topic,
.public-page .section-heading p,
.public-page .match-date,
.public-page .match-footer,
.public-page .team-member-item small {
  color: #667154;
}

.public-page .hero-meta span,
.public-page .comment-tag,
.public-page .status-badge {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(121, 142, 90, 0.14);
}

.public-page .metric-card {
  background:
    linear-gradient(135deg, rgba(255, 248, 240, 0.94), rgba(238, 247, 225, 0.9)),
    radial-gradient(circle at 100% 0, rgba(242, 201, 168, 0.18), transparent 0 34%);
  border-color: rgba(121, 142, 90, 0.14);
}

.public-page .metric-card strong {
  color: #35552f;
}

.public-page .image-button,
.public-page .team-image,
.public-page .admin-preview {
  border-color: rgba(121, 142, 90, 0.12);
  background: linear-gradient(135deg, rgba(244, 205, 193, 0.22), rgba(205, 226, 180, 0.28));
}

.public-page .versus-mark {
  border-color: rgba(121, 142, 90, 0.14);
  background: linear-gradient(135deg, rgba(255, 248, 242, 0.85), rgba(239, 247, 228, 0.9));
  color: #618050;
  box-shadow: 0 10px 24px rgba(122, 142, 94, 0.12);
}

.public-page .team-content blockquote {
  border-left-color: rgba(221, 147, 132, 0.4);
  color: #8d5b50;
}

.public-page .team-member-item {
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(121, 142, 90, 0.08);
}

.public-page .like-button {
  background: linear-gradient(135deg, rgba(245, 217, 196, 0.8), rgba(233, 243, 219, 0.88));
  color: #476539;
}

.public-page .share-button {
  background: linear-gradient(135deg, rgba(224, 240, 205, 0.86), rgba(212, 232, 244, 0.86));
  color: #3f6763;
}

.public-page .like-button.liked,
.public-page .primary-button {
  background: linear-gradient(135deg, #d58c77, #98ba72);
  color: #fffdf9;
  box-shadow: 0 12px 28px rgba(132, 162, 96, 0.18);
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 12;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 235, 228, 0.96), rgba(221, 240, 199, 0.94));
  color: #597648;
  box-shadow: 0 14px 28px rgba(106, 132, 84, 0.18);
  cursor: pointer;
}

.music-toggle[data-state="playing"] {
  background: linear-gradient(135deg, #d58c77, #98ba72);
  color: #fffdf9;
}

.music-toggle-icon {
  font-size: 24px;
  line-height: 1;
}

.music-toggle-text {
  display: none;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent);
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
}

.hero-text {
  margin-top: 18px;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions {
  margin-top: 22px;
  display: grid;
  justify-items: start;
}

.hero-login-button {
  min-width: 188px;
  text-align: center;
  min-height: 48px;
}

.hero-meta span,
.comment-tag,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text-muted);
}

.hero-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
  align-content: center;
}

.metric-card {
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(237, 220, 193, 0.8));
  border: 1px solid rgba(130, 96, 59, 0.12);
}

.metric-card strong {
  display: block;
  font-size: clamp(36px, 5vw, 52px);
  color: var(--accent-deep);
}

.metric-card span {
  color: var(--text-muted);
}

.section {
  margin-top: 32px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading p {
  max-width: 420px;
  color: var(--text-muted);
  line-height: 1.7;
}

.match-grid,
.team-grid,
.admin-card-grid {
  display: grid;
  gap: 20px;
}

.match-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.match-card {
  padding: 24px;
}

.match-card-top,
.comment-head,
.team-head,
.admin-card-head,
.comment-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-date {
  color: var(--text-muted);
  font-size: 14px;
}

.match-topic {
  margin: 16px 0 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.versus-team {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.image-button,
.team-image {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.image-button,
.team-image,
.admin-preview {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(130, 96, 59, 0.16);
  background: linear-gradient(135deg, rgba(175, 60, 47, 0.15), rgba(190, 139, 63, 0.25));
  display: grid;
  place-items: center;
}

.team-image {
  width: 100%;
  height: 260px;
  border-radius: 24px 24px 0 0;
}

.image-button img,
.team-image img,
.admin-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--media-focus-x, 50%) var(--media-focus-y, 50%);
  transform: scale(var(--media-zoom, 1));
  transform-origin: center center;
}

.image-button span,
.team-image span {
  font-size: 30px;
  font-family: "Noto Serif SC", serif;
  color: var(--accent-deep);
}

.versus-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(130, 96, 59, 0.15);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.54);
}

.match-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--text-muted);
}

.status-badge.scheduled {
  color: var(--gold);
}

.status-badge.ongoing {
  color: var(--accent);
}

.status-badge.finished {
  color: var(--green);
}

.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.team-card {
  overflow: hidden;
}

.team-content {
  padding: 20px;
}

.team-head p,
.team-description,
.comment-card p,
.admin-sidebar p,
.ghost-link {
  color: var(--text-muted);
}

.team-content blockquote {
  margin: 16px 0 12px;
  padding-left: 16px;
  border-left: 3px solid rgba(175, 60, 47, 0.36);
  color: var(--accent-deep);
  line-height: 1.7;
}

.team-description {
  line-height: 1.75;
}

.team-members {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.team-members strong {
  font-size: 14px;
  color: var(--text-muted);
}

.team-member-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(130, 96, 59, 0.08);
}

.team-member-item span {
  font-weight: 500;
}

.team-member-item small {
  color: var(--text-muted);
  line-height: 1.6;
}

.team-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.like-button,
.share-button,
.primary-button,
.secondary-button,
.danger-button {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.like-button,
.share-button,
.primary-button,
.secondary-button,
.danger-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  line-height: 1;
  text-decoration: none;
}

.like-button {
  background: rgba(175, 60, 47, 0.09);
  color: var(--accent-deep);
}

.share-button {
  background: rgba(52, 85, 64, 0.1);
  color: var(--green);
}

.like-button.liked {
  background: linear-gradient(135deg, var(--accent), #c96f58);
  color: #fffaf4;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #c96f58);
  color: #fff9f2;
}

.secondary-button {
  background: rgba(52, 85, 64, 0.1);
  color: var(--green);
}

.danger-button {
  background: rgba(127, 35, 27, 0.11);
  color: var(--accent-deep);
}

.like-button:hover,
.share-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-link:hover {
  transform: translateY(-1px);
}

.comments-layout {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 20px;
}

.comment-form,
.admin-form,
.admin-login {
  padding: 24px;
}

.comment-form,
.admin-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 14px;
  color: var(--text-muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(130, 96, 59, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 13px 15px;
  color: var(--text);
}

input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  padding: 0;
}

textarea {
  resize: vertical;
}

.comment-list,
.comment-review-list {
  display: grid;
  gap: 14px;
}

.member-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.member-editor {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(130, 96, 59, 0.1);
  display: grid;
  gap: 10px;
}

.pairing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pairing-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(130, 96, 59, 0.1);
  display: grid;
  gap: 10px;
}

.image-upload-group {
  display: grid;
  gap: 12px;
}

.image-cropper {
  display: grid;
  gap: 12px;
}

.image-cropper-frame {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(130, 96, 59, 0.14);
  background: linear-gradient(135deg, rgba(255, 251, 247, 0.9), rgba(238, 244, 230, 0.86));
}

.image-cropper-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(130, 96, 59, 0.18);
  border-radius: 24px;
  pointer-events: none;
}

.image-cropper-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--media-focus-x, 50%) var(--media-focus-y, 50%);
  transform: scale(var(--media-zoom, 1));
  transform-origin: center center;
}

.image-cropper-preview.is-empty {
  opacity: 0;
}

.image-cropper-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  color: var(--text-muted);
}

.image-cropper-empty.is-hidden {
  display: none;
}

.image-cropper-controls {
  display: grid;
  gap: 10px;
}

.site-settings-panel {
  max-width: 760px;
}

.site-settings-form {
  gap: 16px;
}

.pairing-card h4 {
  margin: 0;
  font-size: 18px;
}

.pairing-empty {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px dashed rgba(130, 96, 59, 0.2);
  color: var(--text-muted);
}

.match-video-link {
  margin-top: 14px;
}

.match-video-link a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(175, 60, 47, 0.09);
  text-decoration: none;
  color: var(--accent-deep);
}

.comment-card {
  padding: 18px 20px;
}

.comment-card p,
.comment-review-card p {
  margin-top: 10px;
  line-height: 1.75;
}

.empty-card,
.comment-review-card {
  border: 1px dashed rgba(130, 96, 59, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.44);
  padding: 20px;
}

.site-footer {
  margin-top: 26px;
  text-align: right;
  color: var(--text-muted);
}

.site-footer a,
.admin-sidebar nav a,
.ghost-link {
  text-decoration: none;
}

.flash {
  margin-bottom: 16px;
  border-radius: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
}

.flash.success {
  background: rgba(62, 118, 84, 0.1);
  color: var(--green);
}

.flash.error {
  background: rgba(127, 35, 27, 0.09);
  color: var(--accent-deep);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 19, 15, 0.78);
  display: grid;
  place-items: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-inner {
  width: min(940px, 100%);
  padding: 18px;
  border-radius: 28px;
  background: rgba(253, 247, 240, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.lightbox-inner img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 20px;
}

.lightbox-title {
  margin-top: 14px;
  text-align: center;
  color: var(--text-muted);
}

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 30px;
  z-index: 101;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.lightbox-open {
  overflow: hidden;
}

.admin-body {
  background:
    radial-gradient(circle at top left, rgba(175, 60, 47, 0.12), transparent 30%),
    linear-gradient(180deg, #efe3d0 0%, #f7efe4 100%);
}

.admin-layout {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.admin-sidebar {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 16px;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.admin-sidebar nav a {
  padding: 11px 14px;
  border-radius: 16px;
  color: var(--text-muted);
}

.admin-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

.admin-main {
  min-width: 0;
}

.admin-section {
  margin-bottom: 20px;
}

.admin-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 18px;
}

.admin-preview {
  width: 100%;
  height: 220px;
  border-radius: 20px;
}

.button-row,
.inline-form,
.danger-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-list {
  margin-top: 18px;
}

.comment-meta-row {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.admin-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login {
  width: min(460px, 100%);
}

.ghost-link {
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.46);
}

@media (max-width: 960px) {
  .hero,
  .comments-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .match-card,
  .team-card,
  .card-surface {
    border-radius: 24px;
  }

  .team-image {
    height: 220px;
  }

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

  .admin-sidebar {
    position: static;
  }

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

  .sakura-scene {
    width: 220px;
    height: 420px;
    opacity: 0.72;
  }

  .distant-ridges {
    height: 180px;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .admin-layout {
    width: min(100% - 20px, 100%);
  }

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

  .hero-copy,
  .hero-panel,
  .match-card,
  .team-content,
  .comment-form,
  .admin-form,
  .admin-login,
  .admin-sidebar {
    padding: 18px;
  }

  .hero {
    gap: 16px;
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .hero-text {
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-card {
    padding: 18px;
  }

  .hero-actions,
  .hero-login-button {
    width: 100%;
  }

  .hero-login-button {
    min-width: 0;
  }

  .section {
    margin-top: 22px;
  }

  .section-heading h2 {
    font-size: clamp(24px, 8vw, 32px);
  }

  .match-grid,
  .team-grid,
  .admin-card-grid,
  .member-grid,
  .pairing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .image-cropper-frame {
    width: 100%;
  }

  .versus-team {
    gap: 8px;
  }

  .image-button,
  .admin-preview {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }

  .team-image {
    height: 200px;
  }

  .match-footer {
    gap: 10px;
  }

  .match-video-link a,
  .like-button,
  .share-button,
  .primary-button,
  .secondary-button,
  .danger-button,
  .ghost-link {
    width: 100%;
  }

  .comments-layout {
    gap: 16px;
  }

  .comment-form,
  .admin-form,
  .admin-login,
  .comment-review-card,
  .empty-card {
    gap: 12px;
  }

  .admin-sidebar nav {
    grid-template-columns: 1fr;
  }

  .admin-sidebar nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .site-settings-panel {
    max-width: 100%;
  }

  .section-heading,
  .match-card-top,
  .match-footer,
  .comment-head,
  .team-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-actions {
    justify-content: flex-start;
  }

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

  .versus-mark {
    margin: 0 auto;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  .hero-blossoms {
    opacity: 0.6;
  }

  .petal-a,
  .petal-b,
  .petal-c,
  .petal-d {
    transform: scale(0.78);
    transform-origin: center;
  }

  .sakura-scene {
    width: 150px;
    height: 300px;
    opacity: 0.45;
  }

  .distant-ridges {
    height: 132px;
    opacity: 0.62;
  }

  .music-toggle {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 420px) {
  .page-shell,
  .admin-layout {
    width: calc(100% - 16px);
  }

  .hero-copy,
  .hero-panel,
  .match-card,
  .team-content,
  .comment-form,
  .admin-form,
  .admin-login,
  .admin-sidebar,
  .comment-review-card,
  .empty-card {
    padding: 15px;
  }

  .hero-meta span,
  .status-badge,
  .comment-tag {
    width: 100%;
    justify-content: center;
  }

  .match-date {
    font-size: 13px;
  }

  .sakura-scene {
    width: 118px;
    height: 240px;
    opacity: 0.32;
  }

  .music-toggle {
    width: 44px;
    height: 44px;
  }
}
