:root {
  --pageBg: #ffffff;
  --bg: #eef3f8;
  --text: #0f172a;
  --muted: #64748b;
  --stroke: rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: auto;
  overscroll-behavior: none;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
}

.page {
  min-height: 100vh;
  padding: 48px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--pageBg);
}

@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .page {
    min-height: auto;
    height: auto;
    align-items: flex-start;
    overflow: visible;
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

.shell {
  width: 100%;
  max-width: 640px;
  padding: 0;
  border-radius: 36px;
  background: #f0f5f9;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
}

.shellInner {
  padding: 22px 22px 0;
}

.profileWrap {
  max-width: 480px;
  margin: 40px auto 0;
}

.profileTop {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.avatarWrap {
  position: relative;
  width: 128px;
  height: 128px;
  flex: 0 0 128px;
  border-radius: 999px;
  background: #d9f99d;
  display: grid;
  place-items: center;
  box-shadow: none;
}

.avatar {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.statusBadge {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translate(-25%, 25%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18), 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.statusEmoji {
  position: relative;
  z-index: 2;
  font-size: 22px;
  display: inline-block;
  will-change: transform;
  animation: emojiSlide 1.6s ease-in-out infinite;
}

@keyframes emojiSlide {
  0% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(-2px);
  }
}

.profileMain {
  flex: 1;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.statusStars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  transform: rotate(-35deg); /* ↗方向 */
}

.statusStars::before,
.statusStars::after,
.statusStars .s3,
.statusStars .s4 {
  content: "";
  position: absolute;
  left: -40px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(120, 200, 255, 0) 0%,
    rgba(120, 200, 255, 0.9) 55%,
    rgba(120, 200, 255, 0) 100%
  );
  filter: drop-shadow(0 0 6px rgba(120, 200, 255, 0.45));
  opacity: 0.45;
}

/* 44pxバッジ内に確実に入るよう px で配置 */
.statusStars::before {
  top: 8px;
  width: 34px;
  animation: shoot1 1s linear infinite;
}
.statusStars::after {
  top: 18px;
  width: 26px;
  opacity: 0.35;
  animation: shoot2 1.4s linear infinite;
  animation-delay: 0.6s;
}
.statusStars .s3 {
  top: 26px;
  width: 30px;
  opacity: 0.5;
  animation: shoot3 2.2s linear infinite;
  animation-delay: 1.1s;
}
.statusStars .s4 {
  top: 32px;
  width: 22px;
  opacity: 0.3;
  animation: shoot4 1.6s linear infinite;
  animation-delay: 0.9s;
}

@keyframes shoot1 {
  from {
    transform: translateX(-20px);
  }
  to {
    transform: translateX(120px);
  }
}
@keyframes shoot2 {
  from {
    transform: translateX(-10px);
  }
  to {
    transform: translateX(110px);
  }
}
@keyframes shoot3 {
  from {
    transform: translateX(-30px);
  }
  to {
    transform: translateX(130px);
  }
}
@keyframes shoot4 {
  from {
    transform: translateX(-10px);
  }
  to {
    transform: translateX(105px);
  }
}

.name {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.bio {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.bio span {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pill {
  height: 32px;
  padding: 0 10px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  font-weight: 400;
}

.pill .emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  line-height: 1;
  flex: 0 0 auto;
}

.pill .label {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  line-height: 1;
}

.memo {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--stroke);
  display: flex;
  gap: 12px;
  align-items: center;
  overflow: hidden;
}

.memoDate {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.memoDivider {
  width: 1px;
  height: 18px;
  background: rgba(15, 23, 42, 0.1);
  flex: 0 0 auto;
}

.memoTextWrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-family: "IBM Plex Sans JP", system-ui, sans-serif;
  white-space: nowrap;
  position: relative;
}

.memoTyping {
  display: inline-block;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
}

.memoCaret {
  display: inline-block;
  width: 1px;
  height: 14px;
  margin-left: 4px;
  background: rgba(15, 23, 42, 0.1);
  vertical-align: middle;
  animation: caretBlink 1.1s steps(1) infinite;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.ticketDivider {
  --hole: 36px;
  --gap: 4px;
  --dot: #b6c2cf;
  --inner: 24px;

  position: relative;
  height: 48px;
  margin: 16px 0 20px;
  margin-left: -22px;
  margin-right: -22px;
}

.ticketDivider::before,
.ticketDivider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--hole);
  height: var(--hole);
  border-radius: 50%;
  background: var(--pageBg);
  transform: translateY(-50%);
  pointer-events: none;
}

.ticketDivider::before {
  left: 0;
  transform: translate(-50%, -50%);
}

.ticketDivider::after {
  right: 0;
  transform: translate(50%, -50%);
}

.ticketLine {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  left: calc(var(--inner) + (var(--hole) / 2) + var(--gap));
  right: calc(var(--inner) + (var(--hole) / 2) + var(--gap));
  background: radial-gradient(circle, var(--dot) 1.6px, transparent 1.8px) left center / 10px 6px repeat-x;
}

.socialSection {
  margin-top: 0;
  padding: 0 24px;
}

.socialGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tileLink {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tile {
  aspect-ratio: 288/199;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 2px 2px 14px rgba(114, 146, 174, 0.5);
  outline: 1px solid rgba(255, 255, 255, 0.25);
  outline-offset: -1px;
}

.tile.instagram {
  background: linear-gradient(162deg, #ff0069 12%, #7638fa 135%);
}

.tile.px500 {
  background: linear-gradient(180deg, #222, #45465c);
}

.tileLabel {
  position: absolute;
  left: 32px;
  bottom: 24px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.thumbSection {
  margin-top: 16px;
  padding: 0 24px 24px;
}

.thumbRow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 24px;
}

.thumb {
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  background: #dee6ee;
  box-shadow: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.tileLink.tilt {
  position: relative;
  perspective: 900px;
  transform-style: preserve-3d;
}

.tileLink.tilt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.18);
  opacity: 0.22;
  filter: blur(8px);
  pointer-events: none;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(10px) translateZ(-1px);
}

.tileLink.tilt .tile {
  transform-style: preserve-3d;
  transition: box-shadow 0.18s ease, filter 0.18s ease;
  will-change: transform;
}

.tileLink.tilt:hover .tile {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  filter: saturate(1.03);
}

.tileLink.tilt .tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(
    420px 160px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.06) 40%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.tileLink.tilt:hover .tile::after {
  opacity: 0.9;
}

@media (max-width: 640px) {
  .profileTop {
    flex-direction: column;
  }
  .socialGrid {
    grid-template-columns: 1fr;
  }
  .thumbRow {
    grid-template-columns: 1fr;
  }
}
