/* ==========================================================================
   RYUTA SHARE THE PARK AREA (share.html) - CLEAN & OPTIMIZED STYLES
   ========================================================================== */

/* --- Container & Page Layout --- */
.share-page-body {
  margin: 0;
  padding: 0;
  background-color: #0b1329;
}

.share-page-container {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 45px 16px 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  background: url('../assets/share_bg_pc.png') center top / cover no-repeat;
  position: relative;
  animation: sharePageFadeIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sharePageFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Header Section (Ribbon Banner & Subtitles) --- */
.share-header-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  width: 100%;
  max-width: 520px;
  position: relative;
}

.share-ribbon-banner {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-ribbon-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
}

.share-curved-title-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.share-title-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.share-subtitle-line2 {
  margin: 6px 0 10px;
  font-family: var(--font-jap, 'Zen Maru Gothic', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.5px;
}

/* --- Handwritten Decorative Overlay Text (Mockup Aesthetics) --- */
.handwritten-decor {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 32px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 8;
  white-space: nowrap;
  line-height: 1.15;
}

.hw-top-left {
  top: 30%;
  left: 22%;
  font-size: 2.4rem;
  transform: rotate(-12deg);
}

/* --- Center Stage Section (Ticket + Chibi Character) --- */
.share-stage-section {
  width: 100%;
  max-width: 620px;
  height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 10;
  margin: 25px 0 15px;
}

/* Floating & Swaying Animation for Share Ticket */
@keyframes ticketFloatSway {

  0%,
  100% {
    transform: translateX(-66%) rotate(-4deg) translateY(0);
  }

  50% {
    transform: translateX(-66%) rotate(-1.5deg) translateY(-10px);
  }
}

/* Ticket Container & Clickable Picture Link */
.share-ticket-wrapper {
  position: absolute;
  left: 40%;
  bottom: 15px;
  width: 360px;
  max-width: 85%;
  z-index: 11;
  cursor: pointer;
  text-decoration: none;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.32));
  animation: ticketFloatSway 4.5s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.35s ease;
}

.share-ticket-wrapper:hover {
  transform: translateX(-66%) rotate(-1deg) translateY(-12px) scale(1.04) !important;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 20px rgba(254, 240, 138, 0.5)) !important;
}

.share-ticket-wrapper:active {
  transform: translateX(-66%) rotate(-3deg) translateY(-4px) scale(0.98) !important;
}

.share-ticket-picture,
.share-ticket-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Ticket Fallback Card (Styled when PNG is missing) */
.share-ticket-fallback {
  display: none;
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #fffcf4 0%, #f7eccd 100%);
  border: 3px solid #7c5e37;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 12px 18px;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 4px #fff8e5, 0 8px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.share-ticket-fallback::before,
.share-ticket-fallback::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  background-color: #0b1329;
  border-radius: 50%;
  transform: translateY(-50%);
  border: 2px solid #7c5e37;
}

.share-ticket-fallback::before {
  left: -11px;
}

.share-ticket-fallback::after {
  right: -11px;
}

.ticket-decor-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #3b507d;
  color: #fff;
  font-size: 14px;
  padding: 2px 14px;
  border-radius: 12px;
  border: 1px solid #7c5e37;
}

.ticket-inner-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ticket-badge-txt {
  font-family: 'Rye', cursive, sans-serif;
  font-size: 13px;
  color: #8c6739;
  letter-spacing: 1.5px;
}

.ticket-name-txt {
  font-family: 'Alfa Slab One', cursive, sans-serif;
  font-size: 26px;
  color: #3b2c1a;
  margin: 2px 0 0;
  letter-spacing: 2px;
}

.ticket-sub-txt {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #a67c48;
  letter-spacing: 1px;
}

/* Chibi Stage Container */
.share-chibi-stage {
  width: 360px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 14;
  position: relative;
  transform: translate(145px, 12px);
}

.share-chibi-hero-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28));
  animation: shareChibiFloat 3.5s ease-in-out infinite alternate;
}

@keyframes shareChibiFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-8px) rotate(1.2deg);
  }
}

/* --- Chibi Speech Bubble (Matching Entrance Design 100%) --- */
.share-chibi-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf7;
  border: 2px solid #5c4a38;
  border-radius: 16px 14px 12px 18px / 14px 16px 12px 18px;
  padding: 7px 14px;
  font-family: var(--font-jap, 'Zen Maru Gothic', sans-serif);
  font-size: 13px;
  font-weight: 800;
  color: #5c4a38;
  white-space: nowrap;
  box-shadow: 3px 3px 0px #dfd9c4;
  z-index: 20;
  pointer-events: none;
  margin-bottom: 8px;
}

.share-chibi-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 8px 0 8px;
  border-style: solid;
  border-color: #5c4a38 transparent transparent transparent;
  display: block;
  width: 0;
}

.share-chibi-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 6px 0 6px;
  border-style: solid;
  border-color: #fffdf7 transparent transparent transparent;
  display: block;
  width: 0;
}

/* --- Bottom Share Action Section --- */
.share-bottom-action-section {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 15;
  position: relative;
}

/* Prompt Callout Above Button */
.share-prompt-callout {
  margin-bottom: 14px;
  text-align: center;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.callout-slash-l,
.callout-slash-r {
  font-size: 22px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
}

.callout-text {
  line-height: 1.45;
}

/* Sleek Dark X Button (Enlarged & Prominent per Request) */
.share-x-dark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  height: 58px;
  background: linear-gradient(180deg, #182238 0%, #0d1322 100%);
  color: #ffffff;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 17px;
  font-weight: 800;
  border-radius: 50px;
  border: 2.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(10, 15, 30, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.share-x-dark-btn:hover {
  transform: translateY(-3px) scale(1.03);
  background: linear-gradient(180deg, #243252 0%, #121a2f 100%);
  box-shadow: 0 14px 32px rgba(10, 15, 30, 0.65), 0 0 18px rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.x-brand-logo {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.x-btn-label {
  letter-spacing: 0.6px;
}

.x-btn-arrow {
  font-size: 20px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
}


/* ==========================================================================
   MEDIA QUERIES (Grouped at Bottom per AGENTS.md rules)
   ========================================================================== */
@media (max-width: 580px) {
  .share-page-container {
    padding: 30px 12px 75px;
    background-image: url('../assets/share_bg_sp.png');
    background-position: center top;
    background-size: cover;
  }

  .share-ribbon-banner {
    max-width: 380px;
  }

  .share-subtitle-line2 {
    font-size: 12.5px;
  }

  .handwritten-decor {
    font-size: 1.8rem;
  }

  .hw-top-left {
    top: 25%;
    left: 5%;
  }

  .share-stage-section {
    height: 310px;
    margin: -15px 0 10px;
  }

  .share-ticket-wrapper {
    width: 72%;
    left: 40%;
    bottom: 10%;
  }

  .share-chibi-stage {
    width: 340px;
    transform: translate(22%, 10%);
  }

  .share-chibi-bubble {
    font-size: 11px;
    padding: 6px 11px;
    border-width: 2px;
  }

  .share-prompt-callout {
    font-size: 13.5px;
    margin-bottom: 10px;
  }

  .callout-slash-l,
  .callout-slash-r {
    font-size: 18px;
  }

  .share-x-dark-btn {
    max-width: 330px;
    height: 52px;
    font-size: 15.5px;
  }
}