:root {
  --ink: #3e3440;
  --purple: #775387;
  --pink: #f3a9c1;
  --pink-light: #ffe5ee;
  --cream: #fff9e8;
  --yellow: #ffe597;
  --blue: #b9e8fa;
  --mint: #ccefdc;
  --line: #6a526d;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background-color: #f8d9e4;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.48) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.48) 75%),
    linear-gradient(45deg, rgba(255,255,255,.48) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.48) 75%);
  background-position: 0 0, 9px 9px;
  background-size: 18px 18px;
  font-family: Verdana, "MS PGothic", "Yu Gothic", Arial, sans-serif;
  font-size: 12px;
}

a { color: #4c3c9a; }
a:hover { color: #d1336a; background: #fff4a7; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.page {
  width: min(1120px, calc(100% - 24px));
  margin: 12px auto 24px;
  background: var(--cream);
  border: 2px solid var(--line);
  box-shadow: 6px 6px 0 rgba(67,44,72,.25);
}

.utility-bar {
  display: flex;
  min-height: 26px;
  padding: 5px 9px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: white;
  background: var(--purple);
  border-bottom: 1px solid #312739;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
}

.visitor b {
  padding: 1px 4px;
  color: #84ff89;
  background: #161217;
  border: 1px inset #aaa;
  letter-spacing: .12em;
}

.site-header {
  position: relative;
  min-height: 138px;
  padding: 22px 30px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 10%, rgba(255,255,255,.75) 0 70px, transparent 72px),
    linear-gradient(90deg, #fff6c7, #ffdce8 62%, #cfeeff);
  border-bottom: 2px solid var(--line);
  text-align: center;
}

.sparkles {
  position: absolute;
  inset: 13px 20px auto;
  color: #e49725;
  font-size: 15px;
  letter-spacing: 1.1em;
  opacity: .7;
}

.logo-line {
  position: relative;
  z-index: 1;
  display: flex;
  width: fit-content;
  margin: 0 auto;
  align-items: center;
  gap: 14px;
}

.logo-line img {
  width: 66px;
  height: 66px;
  border: 2px ridge white;
  outline: 1px solid var(--line);
  object-fit: cover;
}

h1 {
  margin: 0;
  color: #d84372;
  font-family: "Arial Black", Verdana, sans-serif;
  font-size: clamp(42px, 6vw, 70px);
  letter-spacing: -.08em;
  line-height: .8;
  text-shadow: 2px 2px 0 white, 4px 4px 0 #f3bd48;
}

.logo-line p {
  margin: 10px 0 0;
  color: #7a4a75;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
}

.welcome {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: #bf3563;
  font-size: 11px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  min-height: 34px;
  padding: 5px 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  background: #eee2f2;
  border-bottom: 1px solid var(--line);
}

.top-nav a {
  padding: 4px 12px;
  color: #503a59;
  background: linear-gradient(#fff, #e3cfeb);
  border: 1px outset #fff;
  outline: 1px solid #7f6885;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:active { border-style: inset; }

.notice-line {
  min-height: 30px;
  padding: 7px 14px;
  overflow: hidden;
  color: #752b52;
  background: #fff5ac;
  border-bottom: 1px dashed #b68563;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.notice-line span {
  margin-right: 8px;
  padding: 2px 5px;
  color: white;
  background: #e5456f;
  animation: blink 1.1s steps(2, end) infinite;
}

@keyframes blink { 50% { opacity: .35; } }

.content-layout {
  display: grid;
  padding: 10px;
  grid-template-columns: 205px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.sidebar { display: grid; gap: 9px; }

.side-box,
.window {
  background: white;
  border: 1px solid var(--line);
}

.side-box { padding: 4px; }

.side-box h2,
.window-title {
  margin: 0;
  padding: 5px 7px;
  color: white;
  background: var(--purple);
  border: 1px solid #4a3852;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
}

.menu-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.menu-list li { border-bottom: 1px dotted #b79cbb; }
.menu-list a {
  display: block;
  padding: 7px 8px 7px 18px;
  background: #fff8fb;
  font-size: 11px;
  text-decoration: none;
}
.menu-list a::before { content: "♥"; margin-left: -13px; margin-right: 5px; color: #e45782; }

.profile-box dl { margin: 4px 0 0; }
.profile-box dl div { display: grid; grid-template-columns: 62px 1fr; border-bottom: 1px dotted #b79cbb; }
.profile-box dt,
.profile-box dd { margin: 0; padding: 5px; font-size: 10px; }
.profile-box dt { color: #7c4767; background: #ffe9f0; font-weight: 700; }
.profile-box dd { background: #fffdf5; }

.link-box { display: grid; gap: 5px; }
.link-box h2 { margin-bottom: 1px; }

.retro-button {
  display: grid;
  min-height: 34px;
  padding: 3px 6px;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: linear-gradient(#7c7281, #2a242c);
  border: 2px outset #ddd;
  font-family: "Arial Black", Verdana, sans-serif;
  font-size: 10px;
  text-decoration: none;
  text-shadow: 1px 1px #000;
}

.retro-button:hover { color: white; filter: brightness(1.08); }
.retro-button:active { border-style: inset; }
.retro-button img { width: 26px; height: 26px; padding: 3px; background: white; object-fit: contain; }
.retro-button.blue { background: linear-gradient(#5ab9e6, #2381b3); }
.retro-button.green { background: linear-gradient(#6ec78d, #27834d); }
.retro-button.yellow { color: #4b3420; background: linear-gradient(#ffe894, #e7af3d); text-shadow: none; }
.retro-button b { display: grid; width: 26px; height: 26px; place-items: center; color: white; background: #4a3852; font-size: 8px; }

.tiny-box p { margin: 0; padding: 5px 7px; border-bottom: 1px dotted #c3a9c7; font-family: "Courier New", monospace; font-size: 10px; }
.tiny-stars { padding: 8px 4px; color: #d03f73; background: #fff5c7; font-size: 9px; text-align: center; }

.main-content { display: grid; gap: 10px; }
.window { overflow: hidden; }
.window-title { text-align: left; }
.window-title span { margin-right: 5px; color: #f8d04c; }
.pink-title { background: #d95480; }
.yellow-title { color: #553f2b; background: #f4cd55; }
.blue-title { color: #304b5d; background: #8ed5ef; }

.hero-window { background: #fffdf8; }

.hero-grid {
  display: grid;
  padding: 14px;
  grid-template-columns: minmax(360px, 460px) minmax(260px, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 42px);
  background:
    linear-gradient(rgba(255,255,255,.72), rgba(255,255,255,.72)),
    repeating-linear-gradient(0deg, #ffe0ec 0 2px, #fff8cf 2px 4px);
}

.square-picture {
  width: min(460px, 100%);
  aspect-ratio: 1;
  padding: 5px;
  background: white;
  border: 4px ridge #f0b0c6;
  outline: 1px solid var(--line);
}

.square-picture img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #756078;
}

.hero-copy { min-width: 0; }
.jp-tag { margin: 0 0 7px; color: #c4346c; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.hero-copy h2 {
  margin: 0 0 14px;
  color: #d33e70;
  font-family: "Arial Black", Verdana, sans-serif;
  font-size: clamp(34px, 4.8vw, 58px);
  letter-spacing: -.06em;
  line-height: .93;
  text-shadow: 2px 2px white, 3px 3px #f3ca4b;
}

.hero-copy > p:not(.jp-tag) { max-width: 430px; margin: 0 0 15px; font-size: 12px; line-height: 1.65; }

.ticker-panel {
  display: grid;
  margin-bottom: 10px;
  padding: 8px 10px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  background: #fff4bc;
  border: 1px solid #8a6f45;
}

.ticker-panel span,
.ticker-panel small { font-size: 9px; font-weight: 700; }
.ticker-panel b { color: #b42f61; font-size: 18px; }

.contract {
  display: grid;
  width: 100%;
  min-height: 54px;
  padding: 6px 8px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 8px;
  color: #443340;
  background: #eef9ff;
  border: 2px outset white;
  outline: 1px solid #6f6875;
  cursor: pointer;
  text-align: left;
}

.contract:active { border-style: inset; }
.contract span { color: #6f4f70; font-size: 9px; font-weight: 700; }
.contract b { overflow: hidden; font-family: "Courier New", monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.contract small { grid-column: 2; grid-row: 1 / 3; color: #a32b58; font-size: 9px; font-weight: 700; }

.quick-links { display: grid; margin-top: 10px; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.quick-links a {
  padding: 6px 3px;
  color: #493c4f;
  background: linear-gradient(#fff, #e6dce9);
  border: 2px outset white;
  outline: 1px solid #7a657d;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.text-page,
.token-page { padding: 18px 20px 22px; }
.text-page h2,
.token-page h2,
.dex-heading h2 { margin: 0 0 12px; color: #b63263; font-size: 22px; }
.text-page p { max-width: 760px; margin: 0 0 10px; line-height: 1.7; }
.mail-note { margin-top: 16px; padding: 7px; color: #714864; background: #fff5b8; border: 1px dashed #9e6e6f; font-family: "Courier New", monospace; font-size: 10px; }

.token-page table { width: 100%; border-collapse: collapse; }
.token-page th,
.token-page td { padding: 8px 10px; border: 1px solid #88708b; font-size: 11px; text-align: left; }
.token-page th { width: 190px; color: #6a3e59; background: #ffe3ed; }
.token-page td { background: #fffdf4; font-family: "Courier New", monospace; font-weight: 700; }

.dex-heading {
  display: flex;
  min-height: 76px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #eefaff;
  border-bottom: 1px solid #7a657d;
}

.dex-heading p { margin: 0 0 3px; color: #5c7180; font-size: 9px; font-weight: 700; }
.dex-heading h2 { margin: 0; }
.dex-heading a { padding: 5px 8px; background: white; border: 1px solid #6c7480; font-size: 9px; font-weight: 700; }

.chart-area { position: relative; min-height: 500px; background: white; }
.chart-area iframe { width: 100%; height: 500px; border: 0; }
.dex-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background:
    linear-gradient(#d9e7ee 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, #d9e7ee 1px, transparent 1px) 0 0 / 28px 28px,
    #fafdff;
  text-align: center;
}
.dex-placeholder[hidden] { display: none; }
.dex-placeholder b { color: #b13363; font-family: "Courier New", monospace; font-size: 17px; }
.dex-placeholder p { margin: 0; font-size: 10px; }

.pixel-chart {
  display: flex;
  width: min(520px, 75%);
  height: 190px;
  align-items: flex-end;
  gap: 5px;
  border-bottom: 2px solid #6d6573;
}
.pixel-chart i { flex: 1; background: #f4a6c0; border: 1px solid #8c5c72; border-bottom: 0; }
.pixel-chart i:nth-child(1) { height: 17%; }
.pixel-chart i:nth-child(2) { height: 28%; }
.pixel-chart i:nth-child(3) { height: 24%; }
.pixel-chart i:nth-child(4) { height: 42%; }
.pixel-chart i:nth-child(5) { height: 37%; }
.pixel-chart i:nth-child(6) { height: 59%; }
.pixel-chart i:nth-child(7) { height: 53%; }
.pixel-chart i:nth-child(8) { height: 74%; }
.pixel-chart i:nth-child(9) { height: 91%; background: #f6d44f; }

footer {
  padding: 18px 12px 22px;
  color: #634b64;
  background: #eee2f2;
  border-top: 2px solid var(--line);
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}
footer p { margin: 0; }
footer a { display: inline-block; margin-top: 8px; font-weight: 700; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: calc(100% - 36px);
  padding: 8px 11px;
  color: white;
  background: #5b405d;
  border: 2px outset white;
  outline: 1px solid #39293b;
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 120ms ease, transform 120ms ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 175px minmax(0, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .square-picture { width: min(500px, 100%); margin: 0 auto; }
  .hero-copy { max-width: 580px; width: 100%; margin: 0 auto; }
}

@media (max-width: 680px) {
  body { background: #f8d9e4; }
  .page { width: 100%; margin: 0; border-inline: 0; box-shadow: none; }
  .utility-bar { align-items: flex-start; flex-direction: column; gap: 3px; }
  .site-header { padding-inline: 12px; }
  .sparkles { letter-spacing: .5em; }
  .logo-line img { width: 54px; height: 54px; }
  h1 { font-size: 40px; }
  .content-layout { padding: 6px; grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; }
  .link-box { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .link-box h2 { grid-column: 1 / -1; }
  .hero-grid { padding: 8px; }
  .square-picture { width: min(460px, 92vw); }
  .hero-copy h2 { font-size: 38px; }
  .token-page th { width: 130px; }
  .dex-heading { align-items: flex-start; flex-direction: column; }
  .chart-area, .chart-area iframe { min-height: 420px; height: 420px; }
}

@media (max-width: 420px) {
  .sidebar { grid-template-columns: 1fr; }
  .link-box { grid-column: auto; grid-template-columns: 1fr; }
  .link-box h2 { grid-column: auto; }
  .logo-line { align-items: flex-start; }
  .logo-line p { letter-spacing: .12em; }
  h1 { font-size: 34px; }
  .quick-links { grid-template-columns: 1fr 1fr; }
  .token-page th,
  .token-page td { display: block; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
