:root {
  --cream:      #fef6ec;
  --pink:       #f2789f;
  --pink-soft:  #fbd5e0;
  --pink-deep:  #d44d78;
  --lcd:        #c8dca0;
  --lcd-dark:   #5a6e3a;
  --lavender:   #d8d0f0;
  --text:       #3a2e2e;
  --text-light: #8a7575;
  --white:      #fffdf9;
  --shadow:     rgba(60, 40, 40, 0.08);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Body & Background ===== */
body {
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  position: relative;
  /* dot grid texture */
  background-image:
    radial-gradient(circle, var(--pink-soft) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ===== Floating Pixel Stars ===== */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.star {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--pink);
  animation: twinkle 3s ease-in-out infinite;
  image-rendering: pixelated;
}
.star::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--lavender);
  top: 8px;
  left: 8px;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.6); }
}

/* ===== Page Wrapper ===== */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

/* ===== HEADER / HERO ===== */
.hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

/* tama-shaped badge with LCD screen */
.tama-badge {
  width: 120px;
  height: 155px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(145deg, var(--pink-soft) 0%, var(--pink) 100%);
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  flex-direction: column;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(242, 120, 159, 0.3),
    inset 0 -3px 8px rgba(212, 77, 120, 0.2),
    0 0 0 3px var(--white),
    0 0 0 5px var(--pink-soft);
  animation: tama-float 4s ease-in-out infinite;
}

@keyframes tama-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Buttons below screen */
.tama-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.tama-btn {
  width: 10px;
  height: 10px;
  background: var(--pink-deep);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    0 1px 3px rgba(60, 40, 40, 0.2);
  transition: transform 0.15s ease;
}

.tama-btn.mid {
  width: 12px;
  height: 12px;
}

.tama-btn:hover {
  transform: scale(1.3);
}

.tama-btn:active {
  transform: scale(0.85);
  background: #a83860;
}

.tama-screen {
  width: 70px;
  height: 56px;
  background: var(--lcd);
  border-radius: 6px;
  border: 2px solid var(--lcd-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(90, 110, 58, 0.3);
}

/* Pixel pet animation */
.pixel-pet {
  color: var(--lcd-dark);
  font-size: 5px;
  line-height: 1;
  letter-spacing: 1px;
  animation: pet-bounce 1.5s ease-in-out infinite;
  image-rendering: pixelated;
}

@keyframes pet-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.pet-row { text-align: center; }

/* ===== Angry state when buttons are pressed ===== */
.tama-badge:has(.tama-btn:active) .tama-screen {
  background: #dca0a0;
  border-color: #6e3a3a;
  box-shadow: inset 0 2px 6px rgba(110, 58, 58, 0.4);
}

.tama-badge:has(.tama-btn:active) .pixel-pet {
  animation: pet-shake 0.08s linear infinite;
  color: #6e3a3a;
}

.tama-badge:has(.tama-btn:active) .pixel-pet .pet-row {
  display: none;
}

.tama-badge:has(.tama-btn:active) .pixel-pet::before {
  content: "( \FF40\3078\B4  )";
  display: block;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -1px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
}

@keyframes pet-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-2px); }
  75%      { transform: translateX(2px); }
}

/* Title */
.site-title {
  font-family: 'Silkscreen', monospace;
  font-size: 2.4rem;
  color: var(--pink-deep);
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--pink-soft);
}

.title-deco {
  font-size: 0.7em;
  color: var(--pink);
  vertical-align: middle;
  animation: deco-pulse 2s ease-in-out infinite;
}

@keyframes deco-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.tagline {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Decorative pixel divider */
.header-divider, .footer-deco {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
}

.header-divider span, .footer-deco span {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--pink);
  border-radius: 1px;
  opacity: 0.4;
}

.header-divider span:nth-child(odd), .footer-deco span:nth-child(odd) {
  background: var(--lavender);
  opacity: 0.6;
}

/* ===== NAV ===== */
.pill-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2.5rem;
}

.pill {
  font-family: 'Silkscreen', monospace;
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--pink-deep);
  background: var(--white);
  border: 2px solid var(--pink-soft);
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  transition: all 0.25s ease;
  letter-spacing: 0.06em;
}

.pill:hover {
  background: var(--pink);
  color: var(--white);
  border-color: var(--pink);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 120, 159, 0.35);
}

/* ===== SECTION HEADINGS ===== */
.section-heading {
  font-family: 'Silkscreen', monospace;
  font-size: 1.2rem;
  color: var(--pink-deep);
  margin-bottom: 1.2rem;
  text-shadow: 1px 1px 0 var(--pink-soft);
}

.bullet {
  color: var(--pink);
  margin-right: 0.3rem;
}

/* ===== INTRO CARD ===== */
.intro-card {
  position: relative;
  background: var(--white);
  border: 2px solid var(--pink-soft);
  border-radius: 16px;
  padding: 2rem 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 6px 24px var(--shadow);
}

.intro-card h2 {
  font-family: 'Silkscreen', monospace;
  font-size: 1.2rem;
  color: var(--pink-deep);
  margin-bottom: 1rem;
  text-shadow: 1px 1px 0 var(--pink-soft);
}

.intro-card p {
  line-height: 1.75;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.intro-card p:last-of-type { margin-bottom: 0; }

/* Corner decorations */
.card-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--pink);
  opacity: 0.4;
}
.card-corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.card-corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.card-corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.card-corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

/* ===== TOOLS GRID ===== */
.tools-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

.tool-card {
  background: var(--white);
  border: 2px solid var(--pink-soft);
  border-radius: 14px;
  padding: 1.3rem 1rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow);
}

.tool-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  filter: grayscale(0.3);
}

.tool-card h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 0.8rem;
  color: var(--pink-deep);
  margin-bottom: 0.7rem;
  letter-spacing: 0.04em;
}

.tool-card ul { list-style: none; text-align: left; }

.tool-card li {
  font-size: 0.82rem;
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
  color: var(--text);
}

.tool-card li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--pink);
  font-size: 0.7rem;
  top: 0.3rem;
}

/* ===== GUIDE TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

/* vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: repeating-linear-gradient(
    to bottom,
    var(--pink-soft) 0px,
    var(--pink-soft) 6px,
    transparent 6px,
    transparent 12px
  );
  border-radius: 2px;
}

.step {
  position: relative;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.step-num {
  position: absolute;
  left: -3rem;
  top: 0;
  width: 34px;
  height: 34px;
  background: var(--pink);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(242, 120, 159, 0.4);
  z-index: 2;
}

.step-body {
  background: var(--white);
  border: 2px solid var(--pink-soft);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  flex: 1;
  transition: box-shadow 0.2s ease;
}

.step-body:hover {
  box-shadow: 0 4px 16px var(--shadow);
}

.step-body h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  color: var(--pink-deep);
  margin-bottom: 0.5rem;
}

.step-body p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.step-body code {
  font-family: 'Silkscreen', monospace;
  font-size: 0.75rem;
  background: var(--lcd);
  color: var(--lcd-dark);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  border: 1px solid rgba(90, 110, 58, 0.2);
}

.step-body img, .guide-img, .intro-card img {
  width: 100%;
  max-width: 560px;
  display: block;
  margin: 1.2rem auto 0.4rem;
  border-radius: 10px;
  border: 2px solid var(--pink-soft);
  box-shadow: 0 4px 12px var(--shadow);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

.footer-deco { margin-bottom: 1rem; }

footer strong { color: var(--pink-deep); }

.footer-sub {
  margin-top: 0.3rem;
  font-family: 'Silkscreen', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  opacity: 0.5;
}

/* ===== GUIDE CARD GRID ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.guide-card {
  position: relative;
  display: block;
  background: var(--white);
  border: 2px solid var(--pink-soft);
  border-radius: 14px;
  padding: 1.5rem 1.3rem 2.2rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  overflow: hidden;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(242, 120, 159, 0.2);
  border-color: var(--pink);
}

.guide-card h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 0.8rem;
  color: var(--pink-deep);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.guide-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-light);
}

.guide-card-tag {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  background: var(--lcd);
  color: var(--lcd-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(90, 110, 58, 0.2);
}

.guide-card-tag.soon {
  background: var(--lavender);
  color: #6b60a0;
  border-color: rgba(107, 96, 160, 0.2);
}

/* ===== SCROLL ANIMATIONS ===== */
.intro-card, .guide-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.6s ease forwards;
}

.intro-card  { animation-delay: 0.1s; }
.guide-card:nth-child(1) { animation-delay: 0.1s; }
.guide-card:nth-child(2) { animation-delay: 0.2s; }
.guide-card:nth-child(3) { animation-delay: 0.3s; }
.guide-card:nth-child(4) { animation-delay: 0.4s; }
.guide-card:nth-child(5) { animation-delay: 0.5s; }
.guide-card:nth-child(6) { animation-delay: 0.6s; }
.guide-card:nth-child(7) { animation-delay: 0.7s; }
.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }
.step:nth-child(5) { animation-delay: 0.5s; }
.step:nth-child(6) { animation-delay: 0.6s; }

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .page-wrap { padding: 1rem; }

  .site-title { font-size: 1.7rem; }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .tama-badge { width: 100px; height: 130px; }
  .tama-screen { width: 58px; height: 46px; }
  .tama-btn { width: 8px; height: 8px; }
  .tama-btn.mid { width: 10px; height: 10px; }
  .tama-buttons { gap: 8px; margin-top: 4px; }

  .intro-card { padding: 1.5rem 1.2rem; }
}

/* ===== SELECTION ===== */
::selection {
  background: var(--pink-soft);
  color: var(--pink-deep);
}
