:root {
  --navy: #000066;
  --blue: #1268c4;
  --sky: #8fd6ff;
  --pale: #eef9ff;
  --yellow: #fff7a8;
  --pink: #ff45b5;
  --line: #5c86ad;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 8px; }

body {
  min-width: 320px;
  margin: 0;
  padding: 18px 8px 36px;
  color: #111;
  background:
    linear-gradient(45deg, rgba(255,255,255,.3) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.3) 75%),
    linear-gradient(45deg, rgba(255,255,255,.3) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.3) 75%),
    #79caff;
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 13px;
}

a { color: #0000ee; }
a:visited { color: #551a8b; }
img { display: block; }

.site {
  width: min(1120px, 100%);
  margin-inline: auto;
  overflow: hidden;
  background: #fff;
  border: 3px ridge #dbefff;
  box-shadow: 8px 8px 0 rgba(0,0,90,.22);
}

.utility-bar {
  display: flex;
  min-height: 28px;
  padding: 5px 9px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: white;
  background: var(--navy);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .04em;
}

.counter,
.big-counter {
  padding: 2px 5px;
  color: #39ff14;
  background: #050505;
  border: 2px inset #aaa;
  font-family: "Courier New", monospace;
  letter-spacing: .16em;
}

.masthead {
  position: relative;
  display: grid;
  min-height: 188px;
  padding: 19px 70px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 25%, white 0 2px, transparent 3px),
    radial-gradient(circle at 80% 35%, #fff7a8 0 3px, transparent 4px),
    linear-gradient(#83d4ff, #dff7ff 58%, #bff5a0 59%, #7ed957);
  background-size: 55px 55px, 70px 70px, auto;
  border-bottom: 4px ridge #fff;
  text-align: center;
}

.masthead-copy { position: relative; z-index: 2; }
.masthead p { margin: 0 0 4px; color: var(--navy); font-size: 10px; font-weight: bold; letter-spacing: .16em; }
.masthead h1 {
  margin: 0;
  color: #fff;
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  font-size: clamp(43px, 8vw, 76px);
  letter-spacing: -.08em;
  line-height: .95;
  -webkit-text-stroke: 2px #450099;
  text-shadow:
    3px 3px 0 #ff30af,
    6px 6px 0 #6534d5,
    8px 8px 2px rgba(0,0,0,.25);
  transform: rotate(-1deg);
}
.masthead strong { display: block; margin-top: 10px; color: #8a005f; font-family: "Comic Sans MS", cursive; font-size: 14px; }
.sparkle { position: absolute; z-index: 1; color: #fff700; font-size: 54px; text-shadow: 2px 2px 0 #ff3caf; }
.sparkle-left { left: 22px; top: 52px; transform: rotate(-14deg); }
.sparkle-right { right: 22px; top: 34px; transform: rotate(18deg); }

.button-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 4px;
  background: #9db8cf;
  border-top: 2px solid white;
  border-bottom: 2px solid #244768;
}
.button-row a {
  display: grid;
  min-height: 38px;
  padding: 6px;
  place-items: center;
  color: #fff;
  background: linear-gradient(#6e9bd0, #194e8a);
  border: 2px outset #a9c7e6;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  text-shadow: 1px 1px #001c4c;
}
.button-row a:hover { background: linear-gradient(#ff83d1, #b30071); }
.button-row a:active { border-style: inset; }

.news-ticker {
  overflow: hidden;
  color: #7a0000;
  background: var(--yellow);
  border-top: 1px solid #f3cc42;
  border-bottom: 1px solid #d2a814;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}
.news-ticker > div {
  width: max-content;
  padding: 6px 0;
  animation: ticker 20s linear infinite;
}
@keyframes ticker { from { transform: translateX(1120px); } to { transform: translateX(-100%); } }

.page-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 190px;
  gap: 9px;
  padding: 9px;
  align-items: start;
  background: #dff4ff;
}

.sidebar,
.content { display: grid; gap: 9px; min-width: 0; }

.retro-box {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 2px ridge #9cb8d0;
}
.retro-box > h2 {
  margin: 0;
  padding: 5px 7px;
  color: #fff;
  background: linear-gradient(90deg, #002d78, #4299e8 70%, #b8e6ff);
  border-bottom: 1px solid #001d5e;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: .04em;
  text-shadow: 1px 1px #00133f;
}

.menu-list { display: grid; }
.menu-list a {
  padding: 7px 8px;
  color: #000080;
  background: #f3fbff;
  border-bottom: 1px dotted #8fb2cd;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
}
.menu-list a:hover { color: #b00072; background: #fff6c7; }

.tiny-center { padding-bottom: 8px; text-align: center; }
.tiny-center > h2 { margin-bottom: 8px; }
.tiny-center p { margin: 7px; font-size: 10px; line-height: 1.4; }
.award {
  display: grid;
  width: 104px;
  min-height: 52px;
  margin: 7px auto;
  padding: 4px;
  place-items: center;
  color: white;
  border: 3px outset #eee;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.05;
  text-shadow: 1px 1px #000;
}
.award.purple { background: linear-gradient(135deg, #ff45c7, #500091); }
.award.green { background: linear-gradient(135deg, #72ef55, #008144); }
.award small { font-size: 8px; }
.blink { color: red; font-weight: bold; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.big-counter { display: inline-block; margin: 1px auto; }

.welcome-inner {
  display: grid;
  grid-template-columns: minmax(270px, .9fr) 1.1fr;
  min-height: 390px;
  background: linear-gradient(#eaf9ff, #fff);
}
.dog-stage {
  position: relative;
  display: grid;
  min-height: 390px;
  overflow: hidden;
  place-items: end center;
  background:
    radial-gradient(circle at 20% 22%, white 0 2px, transparent 3px) 0 0 / 34px 34px,
    linear-gradient(#9cddff 0 66%, #91dd6b 67%);
  border-right: 1px dashed #5a8cb7;
}
.dog-stage::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 7px;
  left: 12%;
  height: 13px;
  background: rgba(0,0,0,.18);
  border-radius: 50%;
}
.dog-stage img { position: relative; z-index: 2; width: 250px; max-height: 390px; object-fit: contain; object-position: center bottom; }
.stage-star { position: absolute; z-index: 1; color: #fff700; font-size: 29px; text-shadow: 2px 2px #f04; }
.stage-star.one { top: 22px; left: 12px; transform: rotate(-12deg); }
.stage-star.two { top: 75px; right: 12px; font-size: 19px; }
.welcome-copy { display: grid; padding: 28px 25px; align-content: center; }
.welcome-copy h3 { margin: 0 0 14px; color: #9b0070; font-family: "Comic Sans MS", cursive; font-size: 30px; }
.welcome-copy p { margin: 0 0 12px; line-height: 1.55; }
.email-note { padding: 7px; color: #4b0069; background: #fff5b8; border: 1px dashed #a85b8f; font-size: 10px; }

.facts-table { width: 100%; border-collapse: collapse; }
.facts-table th,
.facts-table td { padding: 9px 11px; border: 1px solid #b9d4e8; text-align: left; vertical-align: middle; }
.facts-table th { width: 38%; color: #000066; background: #edf8ff; font-size: 10px; }
.facts-table td { overflow-wrap: anywhere; }

.copy-ca {
  display: flex;
  width: 100%;
  padding: 4px 6px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  color: #000;
  background: #fffbd7;
  border: 2px outset #e0d796;
  cursor: pointer;
  text-align: left;
}
.copy-ca:active { border-style: inset; }
.copy-ca b { overflow: hidden; font-family: "Courier New", monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.copy-ca small { color: #0000bb; font-size: 9px; white-space: nowrap; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; background: #fffdf0; }
.gallery-grid figure { margin: 0; padding: 5px; background: white; border: 1px solid #98a8b7; box-shadow: 2px 2px 0 #c7c7c7; }
.gallery-grid figure > div { aspect-ratio: 1; overflow: hidden; background: #caedff; border: 1px inset #abc; }
.gallery-grid figure:nth-child(2) > div { background: #fff4c1; }
.gallery-grid figure:nth-child(3) > div { background: #ffdff4; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid figcaption { padding-top: 5px; overflow: hidden; color: #0000aa; font-family: "Courier New", monospace; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }

.dex-toolbar { display: flex; padding: 6px 8px; align-items: center; justify-content: space-between; gap: 12px; background: #e8eef3; border-bottom: 2px groove #fff; font-size: 9px; }
.dex-toolbar b { color: #a00000; }
.dex-window { position: relative; min-height: 420px; overflow: hidden; background: white; border: 4px inset #b8c6d1; }
#dexFrame { width: 100%; min-height: 430px; border: 0; }
.dex-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  padding: 30px;
  place-content: center;
  color: #003c75;
  background:
    linear-gradient(#c8ddec 1px, transparent 1px),
    linear-gradient(90deg, #c8ddec 1px, transparent 1px),
    #f6fcff;
  background-size: 28px 28px;
  text-align: center;
}
.dex-placeholder[hidden] { display: none; }
.dex-placeholder p { margin: 22px 0 0; font-family: "Courier New", monospace; font-size: 11px; font-weight: bold; }
.old-chart { display: flex; height: 110px; align-items: flex-end; gap: 7px; }
.old-chart i { display: block; width: 14px; height: 20%; background: #19a34a; border: 1px solid #006e2b; }
.old-chart i:nth-child(2) { height: 37%; }
.old-chart i:nth-child(3) { height: 29%; }
.old-chart i:nth-child(4) { height: 51%; }
.old-chart i:nth-child(5) { height: 44%; }
.old-chart i:nth-child(6) { height: 73%; }
.old-chart i:nth-child(7) { height: 64%; }
.old-chart i:nth-child(8) { height: 94%; background: #ff3aa9; border-color: #a20068; }

.guestbook { padding-bottom: 10px; text-align: center; }
.guestbook > h2 { margin-bottom: 10px; text-align: left; }
.guestbook p { margin: 6px 12px; }
.guestbook > a { display: inline-block; margin-top: 6px; font-weight: bold; }

.official-links { display: grid; gap: 2px; padding: 5px; }
.official-links a {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  min-height: 42px;
  padding: 4px 5px;
  align-items: center;
  gap: 6px;
  color: #000066;
  background: linear-gradient(#fff, #d6edff);
  border: 2px outset #c9dfef;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  text-decoration: none;
}
.official-links a:active { border-style: inset; }
.official-links img { width: 29px; height: 29px; object-fit: contain; }
.official-links a:nth-child(2) img { width: 21px; height: 21px; margin: 4px; }
.dex-icon { display: grid; width: 29px; height: 29px; place-items: center; color: white; background: #111; border-radius: 50%; font-size: 7px; }
.side-dog { width: 124px; height: 142px; margin: 0 auto; overflow: hidden; background: #cbedff; border: 3px ridge #fff; }
.side-dog img { width: 100%; height: 153%; object-fit: cover; object-position: 50% 1%; }
.rainbow-text { color: #ff17ae; letter-spacing: .08em; text-shadow: 1px 1px #6b00c4; }
.link-badge { display: grid; width: 128px; height: 64px; margin: 0 auto; place-content: center; color: white; background: linear-gradient(135deg, #037ade, #ff34b2); border: 3px outset white; font-family: "Arial Black", Arial, sans-serif; line-height: .9; text-shadow: 1px 1px #001b55; }
.link-badge span { font-size: 9px; }
.link-badge b { font-size: 24px; }
.link-badge small { font-size: 6px; }

footer { padding: 13px 10px; color: #d7e7ff; background: #000055; border-top: 4px ridge #fff; font-size: 9px; text-align: center; }
footer p { margin: 4px 0; }
footer a, footer a:visited { color: #fff46a; }

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  padding: 8px 11px;
  color: #fff;
  background: #000080;
  border: 3px outset #b8d9ef;
  font-size: 10px;
  font-weight: bold;
  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: 960px) {
  body { padding: 0; background: #79caff; }
  .site { border-width: 0; box-shadow: none; }
  .page-grid { grid-template-columns: 170px minmax(0, 1fr); }
  .right-sidebar { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .right-sidebar .retro-box { min-width: 0; }
}

@media (max-width: 620px) {
  .utility-bar { align-items: flex-start; flex-direction: column; gap: 3px; }
  .masthead { min-height: 150px; padding: 16px 34px; }
  .masthead h1 { font-size: clamp(39px, 13vw, 58px); }
  .sparkle { font-size: 31px; }
  .sparkle-left { left: 8px; }
  .sparkle-right { right: 8px; }
  .button-row { grid-template-columns: repeat(3, 1fr); }
  .button-row a:nth-child(4), .button-row a:nth-child(5) { grid-column: span 1; }
  .page-grid { display: flex; padding: 5px; flex-direction: column; }
  .sidebar, .content { width: 100%; }
  .left-sidebar { grid-template-columns: repeat(2, 1fr); }
  .left-sidebar .retro-box:first-child { grid-column: 1 / -1; }
  .right-sidebar { grid-template-columns: 1fr 1fr; }
  .right-sidebar .retro-box:first-child { grid-column: 1 / -1; }
  .welcome-inner { grid-template-columns: 1fr; }
  .dog-stage { min-height: 350px; border-right: 0; border-bottom: 1px dashed #5a8cb7; }
  .dog-stage img { width: 235px; max-height: 350px; }
  .welcome-copy { padding: 18px 16px; }
  .gallery-grid { gap: 5px; padding: 6px; }
  .dex-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 400px) {
  .masthead p { font-size: 8px; }
  .masthead strong { font-size: 10px; }
  .button-row { grid-template-columns: repeat(2, 1fr); }
  .button-row a:last-child { grid-column: 1 / -1; }
  .left-sidebar, .right-sidebar { display: block; }
  .sidebar .retro-box + .retro-box { margin-top: 5px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid figure > div { aspect-ratio: 1; }
  .facts-table th, .facts-table td { display: block; width: 100%; }
  .facts-table th { border-bottom: 0; }
  .dex-window { min-height: 300px; }
  .dex-placeholder { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .news-ticker > div, .blink { animation: none; }
}
