:root {
  --paper: #effbdd;
  --paper-deep: #d7efbd;
  --mint: #90e8b0;
  --mint-light: #c9f5c7;
  --leaf: #6e9b5a;
  --leaf-dark: #365a35;
  --ink: #29472c;
  --sun: #ffe68a;
  --shadow: rgba(46, 91, 48, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 12%, rgba(255, 255, 255, 0.33) 0 1px, transparent 2px),
    linear-gradient(135deg, #b6f3c4 0%, var(--mint) 48%, #7bdca0 100%);
  background-size: 29px 29px, 41px 41px, auto;
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: 15px;
  line-height: 1.45;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 21rem;
  height: 21rem;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body::before {
  top: -8rem;
  right: -7rem;
  transform: rotate(12deg);
}

body::after {
  bottom: -12rem;
  left: -9rem;
  transform: rotate(-18deg);
}

a {
  color: var(--leaf-dark);
  font-weight: bold;
  text-decoration-color: #7cae69;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

a:hover {
  color: #173c25;
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: #254e30;
  line-height: 1.1;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
}

h2 {
  margin-bottom: 0.55rem;
  font-size: 1.28rem;
}

.site-shell {
  width: min(930px, calc(100% - 3.5rem));
  margin: 1.5rem 0 3rem 2rem;
}

.site-intro,
.sidebar,
.mini-sidebar,
.wide-sidebar,
.box,
.main {
  overflow: hidden;
  border: 2px solid var(--leaf-dark);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(248, 255, 235, 0.97), rgba(221, 244, 201, 0.97));
  box-shadow: 5px 5px 0 var(--shadow), 0 12px 25px rgba(53, 99, 55, 0.12);
}

.site-intro {
  position: relative;
  margin-bottom: 0;
}

.title-bar,
.box-title-bar {
  display: flex;
  align-items: center;
  min-height: 31px;
  padding: 5px 10px;
  color: #fff;
  background: linear-gradient(90deg, #638e54, #82ae69 72%, #6d9b59);
  font-weight: bold;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 rgba(35, 73, 38, 0.4);
}

.box-title-bar {
  min-height: 35px;
  padding: 7px 12px;
}

.right {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
}

.inner {
  padding: 1rem;
}

.site-intro-content {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.35rem;
}

.profile-icon,
.icon {
  display: block;
  width: 92px;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
  border: 3px solid #7fa86c;
  border-radius: 50%;
  background: #dff6c9;
  box-shadow: 3px 3px 0 rgba(70, 119, 67, 0.25);
}

.eyebrow,
.message-label,
.project-kicker {
  margin-bottom: 0.35rem;
  color: #507d48;
  font-size: 0.77rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-copy {
  max-width: 48rem;
  margin-bottom: 0.8rem;
  font-size: 1.03rem;
}

.status-row,
.quick-nav,
.friend-links,
.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-pill {
  display: inline-block;
  padding: 0.22rem 0.62rem;
  border: 1px solid #9ac684;
  border-radius: 999px;
  background: #f6ffe9;
  color: #416b3b;
  font-size: 0.81rem;
  font-weight: bold;
}

.quick-nav {
  padding: 0.75rem 1rem 1rem;
  border-top: 2px dashed #b1d99c;
  background: rgba(193, 232, 174, 0.48);
}

.quick-nav a,
.friend-links a {
  padding: 0.4rem 0.76rem;
  border: 1px solid #74a160;
  border-radius: 999px;
  background: #effbde;
  box-shadow: 2px 2px 0 rgba(71, 119, 65, 0.2);
  text-decoration: none;
}

.quick-nav a:hover,
.friend-links a:hover {
  transform: translate(-1px, -1px);
  background: #fff7c5;
  box-shadow: 3px 3px 0 rgba(71, 119, 65, 0.26);
}

.drag-note {
  margin: -0.75rem 0 0;
  color: #426e43;
  font-size: 0.82rem;
  font-weight: bold;
  text-align: left;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(235px, 340px) minmax(0, 540px);
  align-items: start;
  gap: 1.6rem;
}

.side-stack,
.content-stack {
  display: grid;
  gap: 1.3rem;
}

.side-stack {
  position: relative;
}

.sidebar,
.mini-sidebar,
.wide-sidebar,
.box {
  width: 100%;
}

.draggable-window {
  position: relative;
  will-change: transform;
}

.draggable-window.is-dragging {
  z-index: 10;
  box-shadow: 8px 10px 0 rgba(47, 89, 48, 0.32), 0 24px 44px rgba(40, 76, 41, 0.25);
  user-select: none;
}

.draggable-window.is-dragging .title-bar,
.draggable-window.is-dragging .box-title-bar {
  background: linear-gradient(90deg, #4d834c, #71b368 72%, #62985a);
}

.draggable-window .title-bar,
.draggable-window .box-title-bar {
  touch-action: none;
}

.sidebar img,
.mini-sidebar img,
.wide-sidebar img,
.box img,
.main img {
  max-width: 100%;
  height: auto;
}

.hosted-by {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

.hosted-by img {
  width: 130px;
}

.mini-link {
  display: inline-block;
  margin-top: 0.15rem;
}

.me-card .inner {
  text-align: center;
}

.me-card .icon {
  margin: 0 auto 0.75rem;
}

.directory-list {
  display: grid;
  gap: 0.18rem;
}

.directory-list a {
  padding: 0.22rem 0.35rem;
  border-radius: 4px;
}

.directory-list a:hover {
  background: #fff6be;
}

.changelog-card ul {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.15rem;
}

.announcement-box {
  background: linear-gradient(145deg, #f7ffe9, #e4f9cf);
}

.announcement-bottom,
.friend-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px dashed #94bc7f;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.announcement-bottom p,
.friend-content p {
  margin-bottom: 0;
}

.vibe-button,
.choice-buttons button {
  padding: 0.52rem 0.78rem;
  border: 2px solid #5c8e50;
  border-radius: 7px;
  background: linear-gradient(#fff8b9, #f1dc72);
  color: #2c522d;
  box-shadow: 2px 3px 0 #79a465;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: bold;
}

.vibe-button:hover,
.choice-buttons button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 2px 0 #79a465;
}

.vibe-button.is-popped {
  animation: button-pop 360ms ease-out;
}

.vibe-message {
  max-width: 215px;
  margin: 0.5rem 0 0;
  color: #4f7447;
  font-size: 0.78rem;
  text-align: center;
}

.projects-box .inner,
.arcade-box .inner {
  padding-bottom: 1.25rem;
}

.section-intro {
  margin-bottom: 1rem;
}

.project-grid,
.mini-game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.project-card,
.mini-game {
  min-height: 196px;
  padding: 1rem;
  border: 2px solid #8bb374;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(255, 255, 246, 0.94), rgba(221, 245, 205, 0.92));
  box-shadow: 3px 3px 0 rgba(80, 123, 70, 0.2);
}

.project-card h2,
.mini-game h2 {
  margin-bottom: 0.45rem;
}

.project-card p:not(.project-kicker),
.mini-game p:not(.project-kicker) {
  margin-bottom: 1rem;
}

.featured-project {
  border-color: #649d58;
  background: linear-gradient(145deg, #fbffe0, #cdeeb7);
}

.coming-soon {
  border-style: dashed;
  background: linear-gradient(145deg, #f3fbeb, #deefd0);
}

.project-link {
  display: inline-block;
  color: #244a29;
  font-size: 0.92rem;
}

.disabled-link {
  color: #6f956b;
  cursor: default;
  text-decoration: line-through;
}

.mini-game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-game {
  min-height: 246px;
}

.bug-board {
  position: relative;
  min-height: 92px;
  margin-bottom: 0.65rem;
  overflow: hidden;
  border: 2px dashed #9ac684;
  border-radius: 7px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    #d8f4be;
  background-size: 12px 12px;
}

.bug-button {
  position: absolute;
  top: 27px;
  left: 50%;
  min-width: 52px;
  padding: 0.28rem 0.42rem;
  border: 2px solid #38663c;
  border-radius: 999px;
  background: #ed8f7d;
  color: #3c301f;
  box-shadow: 2px 2px 0 rgba(75, 96, 45, 0.28);
  cursor: crosshair;
  font: inherit;
  font-size: 0.75rem;
  font-weight: bold;
}

.bug-button:hover {
  background: #ffb09c;
}

.game-score,
.game-result {
  margin-bottom: 0 !important;
  color: #4f7447;
  font-size: 0.82rem;
}

.quest-button {
  margin-bottom: 0.65rem;
}

.choice-buttons {
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.choice-buttons button {
  padding: 0.32rem 0.46rem;
  font-size: 0.78rem;
}

.friend-box {
  background: linear-gradient(145deg, #f4ffdc, #ddf4cd);
}

.friend-links {
  justify-content: flex-end;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.2rem 1.35rem;
  border: 2px dashed rgba(45, 90, 51, 0.55);
  border-radius: 12px;
  background: rgba(232, 255, 212, 0.64);
  box-shadow: 3px 3px 0 rgba(67, 112, 61, 0.18);
}

.site-footer p:last-child {
  margin: 0;
  font-size: 0.88rem;
  text-align: right;
}

.big-quote {
  margin: 0;
  color: #355a33;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.big-quote strong {
  display: inline-block;
  color: #2c693c;
  font-size: 1.12em;
  letter-spacing: 0.18em;
}

/* These rules keep older pages using garbage.css readable and centered. */
body > .wide-sidebar,
body > .box,
body > .main {
  width: min(720px, calc(100% - 2.5rem));
  margin: 1.5rem auto;
}

@keyframes button-pop {
  50% {
    transform: rotate(-2deg) scale(1.06);
  }
}

@media (hover: hover) and (min-width: 851px) {
  .draggable-window .title-bar,
  .draggable-window .box-title-bar {
    cursor: grab;
  }

  .draggable-window.is-dragging .title-bar,
  .draggable-window.is-dragging .box-title-bar {
    cursor: grabbing;
  }
}

@media (min-width: 1200px) {
  .site-footer {
    position: fixed;
    top: 37%;
    right: 2rem;
    width: min(19vw, 240px);
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-footer p:last-child {
    margin-top: 1rem;
    text-align: left;
  }
}

@media (max-width: 850px) {
  .site-shell {
    width: min(900px, calc(100% - 2.5rem));
    margin: 1.25rem auto 3rem;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .side-stack {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-stack > :first-child {
    grid-column: 1 / -1;
  }

  .mini-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .mini-game-grid {
    grid-template-columns: 1fr;
  }

  .mini-game {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14px;
  }

  .site-shell {
    width: min(100% - 1.25rem, 1160px);
    margin-top: 0.65rem;
  }

  .site-intro-content {
    align-items: flex-start;
    padding: 1rem;
  }

  .profile-icon {
    width: 70px;
  }

  .quick-nav {
    gap: 0.38rem;
    padding: 0.65rem;
  }

  .quick-nav a,
  .friend-links a {
    padding: 0.34rem 0.55rem;
    font-size: 0.82rem;
  }

  .drag-note {
    display: none;
  }

  .side-stack,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .side-stack > :first-child {
    grid-column: auto;
  }

  .announcement-bottom,
  .friend-content,
  .site-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .friend-links,
  .site-footer p:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .vibe-message {
    max-width: none;
    text-align: left;
  }
}

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

/* The landing page is intentionally a desktop playground. */
.computer-only {
  display: none;
}

.right-stack {
  display: grid;
  align-content: start;
  gap: 1.3rem;
}

@media (min-width: 1101px) {
  .site-shell {
    width: min(1240px, calc(100% - 3rem));
    margin: 1.5rem auto 3rem;
  }

  .landing-grid {
    grid-template-columns: minmax(235px, 330px) minmax(420px, 455px) minmax(270px, 300px);
    gap: 1.5rem;
  }

  .right-stack .site-intro-content {
    display: block;
    padding: 1rem;
    text-align: center;
  }

  .right-stack .profile-icon {
    width: 76px;
    margin: 0 auto 0.65rem;
  }

  .right-stack .site-intro h1 {
    font-size: 1.55rem;
  }

  .right-stack .intro-copy {
    margin-bottom: 0.7rem;
    font-size: 0.94rem;
  }

  .right-stack .status-row,
  .right-stack .quick-nav,
  .right-stack .friend-links {
    justify-content: center;
  }

  .right-stack .quick-nav {
    gap: 0.35rem;
    padding: 0.65rem;
  }

  .right-stack .quick-nav a,
  .right-stack .friend-links a {
    padding: 0.32rem 0.5rem;
    font-size: 0.77rem;
  }

  .right-stack .mini-game-grid,
  .right-stack .friend-content {
    grid-template-columns: 1fr;
  }

  .right-stack .mini-game {
    min-height: 0;
  }

  .right-stack .friend-content {
    align-items: start;
  }
}

@media (max-width: 1100px) {
  .site-shell {
    display: none !important;
  }

  .computer-only {
    display: grid;
    min-height: 100vh;
    padding: 1.25rem;
    place-items: center;
  }

  .computer-only-card {
    width: min(430px, 100%);
    padding: 1.4rem;
    border: 2px solid var(--leaf-dark);
    border-radius: 10px;
    background: linear-gradient(145deg, #f8ffeb, #d9f3c6);
    box-shadow: 6px 6px 0 var(--shadow);
    text-align: center;
  }

  .computer-only-card p:last-child {
    margin-bottom: 0;
  }
}

/* Keep the copy in normal reading lines instead of thin word stacks. */
p,
h1,
h2,
a,
button {
  hyphens: manual;
  overflow-wrap: normal;
  word-break: normal;
}

.announcement-bottom {
  grid-template-columns: 1fr;
  align-items: start;
}

.announcement-bottom > div {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.announcement-bottom .vibe-message {
  max-width: none;
  margin: 0;
  text-align: left;
}
