/* SPYR0.DEV content expansion
   Shared layouts for project pages, notes, changelog, current quest and Treasure Room. */

.footer-external {
  padding: .2rem 0;
  color: inherit;
  font: .66rem var(--mono);
}
.site-footer .footer-external:hover,
.site-footer .footer-external:focus-visible {
  color: var(--gold);
}
.gem-counter.has-treasure-room {
  cursor: pointer;
}
.gem-completion-link {
  display: inline-flex;
  pointer-events: auto;
  margin-top: .65rem;
  padding: .44rem .68rem;
  border: 1px solid rgba(255, 232, 145, .52);
  border-radius: 999px;
  color: #fff2c9;
  font: .58rem var(--mono);
  letter-spacing: .05em;
}
.gem-completion-link:hover,
.gem-completion-link:focus-visible {
  border-color: #fff2c9;
  background: rgba(255,255,255,.06);
}

/* Existing realm pages */
.project-card .project-card-link,
.archive-card .archive-card-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  color: #d8d1f7;
  font: 700 .67rem var(--mono);
  letter-spacing: .03em;
}
.project-card .project-card-link:hover,
.project-card .project-card-link:focus-visible,
.archive-card .archive-card-link:hover,
.archive-card .archive-card-link:focus-visible {
  color: #fff2c9;
}
.project-date {
  display: block;
  margin-top: .75rem;
  color: rgba(185, 180, 229, .54);
  font: .58rem var(--mono);
}
.archive-card.is-link {
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.archive-card.is-link:hover,
.archive-card.is-link:focus-within {
  transform: translateY(-3px);
  border-color: rgba(221, 173, 217, .38);
  background: linear-gradient(155deg, rgba(78, 50, 99, .8), rgba(48, 42, 86, .76));
}

/* Shared content pages */
.content-page {
  min-height: 100svh;
  color: #f7f0de;
  background: #1a1038;
}
.content-page .topbar {
  background: rgba(25, 13, 55, .88);
  backdrop-filter: blur(14px);
}
.content-main {
  min-height: calc(100svh - 82px);
}
.content-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(6.5rem, 12vw, 10rem) 5vw clamp(4rem, 7vw, 6rem);
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 216, 77, .12), transparent 30%),
    radial-gradient(circle at 20% 85%, rgba(128, 85, 209, .16), transparent 34%),
    linear-gradient(180deg, #2c185c, #1f123f);
}
.content-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -36% 20%;
  height: 55%;
  border: 1px solid rgba(255, 242, 201, .08);
  border-radius: 50%;
  rotate: -4deg;
  pointer-events: none;
}
.content-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  margin: 0 auto;
}
.content-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #fff2c9;
  font-size: clamp(3.4rem, 7vw, 7rem);
  line-height: .88;
  letter-spacing: -.07em;
}
.content-hero .lede {
  max-width: 680px;
  margin: 1.4rem 0 0;
  color: rgba(255, 242, 201, .74);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.62;
}
.content-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  margin-top: 1.4rem;
  color: rgba(255, 242, 201, .54);
  font: .61rem var(--mono);
  letter-spacing: .04em;
}
.content-facts strong {
  color: #ffe785;
  font-weight: 600;
}
.content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.4rem;
}
.content-action {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .78rem;
  border: 1px solid rgba(255, 242, 201, .26);
  border-radius: 7px;
  color: #fff2c9;
  background: rgba(255,255,255,.025);
  font: .64rem var(--mono);
}
.content-action:hover,
.content-action:focus-visible {
  border-color: #ffe785;
  color: #ffe785;
}
.content-body {
  padding: clamp(3.5rem, 7vw, 6.5rem) 5vw;
  background: linear-gradient(180deg, #1a1038, #211547);
}
.content-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
}
.content-section + .content-section {
  margin-top: clamp(3.2rem, 6vw, 5.5rem);
}
.content-section h2 {
  max-width: 780px;
  margin: 0 0 1rem;
  color: #f8f0df;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.04em;
}
.content-section h3 {
  margin: 1.6rem 0 .55rem;
  color: #f3ead7;
  font-size: 1.2rem;
}
.content-section p {
  max-width: 780px;
  color: rgba(239, 233, 218, .75);
  line-height: 1.68;
}
.content-section p + p {
  margin-top: .8rem;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.content-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(226, 211, 168, .16);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}
.content-card h3 {
  margin: 0 0 .5rem;
  color: #f5edda;
  font-size: 1rem;
}
.content-card p {
  margin: 0;
  color: rgba(239, 233, 218, .68);
  font-size: .92rem;
  line-height: 1.55;
}
.content-card .micro {
  display: block;
  margin-bottom: .55rem;
  color: #d8bf81;
  font: .56rem var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.visual-strip {
  display: grid;
  grid-template-columns: 1.15fr .85fr .85fr;
  gap: .8rem;
  margin-top: 1rem;
}
.visual-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(226, 211, 168, .14);
  border-radius: 10px;
  background: linear-gradient(145deg, #2f1d60, #162746);
}
.visual-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: contain;
  filter: saturate(.95);
}
.visual-tile:first-child img {
  object-fit: cover;
  object-position: center top;
}
.visual-caption {
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .65rem;
  padding: .4rem .48rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  color: #fff2c9;
  background: rgba(17, 10, 38, .72);
  backdrop-filter: blur(8px);
  font: .55rem var(--mono);
}
.private-source {
  margin-top: 1.1rem;
  padding: .9rem 1rem;
  border-left: 2px solid #9c91d6;
  color: rgba(235, 231, 246, .66);
  background: rgba(86, 64, 135, .08);
  font-size: .88rem;
  line-height: 1.55;
}

/* Dune bot screenshots */
.project-shot {
  margin: 1.35rem 0 0;
}
.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(183, 188, 236, .18);
  border-radius: 10px;
  background: #111326;
}
.project-shot figcaption {
  margin-top: .55rem;
  color: rgba(239, 233, 218, .48);
  font: .56rem/1.5 var(--mono);
}

/* Handbook visual */
.handbook-preview {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 1rem;
  margin-top: 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(183, 188, 236, .18);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(34, 36, 68, .78), rgba(27, 27, 53, .86));
}
.handbook-cover {
  display: grid;
  align-content: space-between;
  min-height: 340px;
  padding: 1.2rem;
  border-radius: 5px;
  color: #f0ead8;
  background:
    linear-gradient(160deg, rgba(255,255,255,.035), transparent 48%),
    #24284a;
  box-shadow: 0 12px 30px rgba(6, 8, 25, .24);
}
.handbook-cover small {
  color: #b8bddc;
  font: .58rem var(--mono);
}
.handbook-cover strong {
  max-width: 250px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: .96;
  letter-spacing: -.04em;
}
.handbook-cover span {
  color: rgba(227, 229, 241, .58);
  font: .6rem var(--mono);
}
.handbook-outline {
  display: grid;
  align-content: start;
  gap: .45rem;
}
.handbook-outline div {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: .65rem;
  padding: .65rem .7rem;
  border-bottom: 1px solid rgba(183, 188, 236, .1);
  color: rgba(230, 230, 241, .7);
  font-size: .82rem;
}
.handbook-outline b {
  color: #aeb7ea;
  font: .57rem var(--mono);
}

/* Notes */
.note-page .content-hero {
  background:
    radial-gradient(circle at 78% 20%, rgba(203, 151, 218, .12), transparent 30%),
    linear-gradient(180deg, #342349, #241b3d);
}
.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  margin-top: 1rem;
  color: rgba(229, 210, 232, .55);
  font: .58rem var(--mono);
}
.note-callout {
  max-width: 780px;
  margin: 1.2rem 0;
  padding: .9rem 1rem;
  border-left: 2px solid #c99bda;
  color: rgba(241, 226, 241, .72);
  background: rgba(201, 155, 218, .06);
  line-height: 1.6;
}
.note-table-wrap {
  overflow-x: auto;
  margin-top: 1.2rem;
  border: 1px solid rgba(221, 173, 217, .18);
  border-radius: 9px;
}
.note-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}
.note-table th,
.note-table td {
  padding: .8rem .9rem;
  border-bottom: 1px solid rgba(221, 173, 217, .12);
  text-align: left;
}
.note-table th {
  color: #e9c4e3;
  background: rgba(221, 173, 217, .06);
  font: .6rem var(--mono);
  letter-spacing: .05em;
}
.note-table td {
  color: rgba(238, 225, 239, .76);
}
.note-table tr:last-child td {
  border-bottom: 0;
}
.code-note {
  max-width: 780px;
  overflow-x: auto;
  margin-top: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(221, 173, 217, .14);
  border-radius: 8px;
  color: #d9d8ed;
  background: #111226;
  font: .67rem/1.65 var(--mono);
  white-space: pre;
}

/* Changelog */
.changelog-list {
  display: grid;
  gap: .8rem;
}
.changelog-entry {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(226, 211, 168, .14);
}
.changelog-entry time {
  color: #d8bf81;
  font: .6rem var(--mono);
}
.changelog-entry h3 {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
}
.changelog-entry p {
  margin: 0;
  color: rgba(239, 233, 218, .68);
  line-height: 1.55;
}

/* Treasure Room */
.treasure-page {
  min-height: 100svh;
  color: #f7f0de;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 218, 92, .12), transparent 28%),
    linear-gradient(180deg, #160e36, #22134d 62%, #14102b);
}
.treasure-state {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 7rem 0 6rem;
}
.treasure-locked,
.treasure-unlocked {
  min-height: calc(100svh - 82px);
}
.treasure-locked {
  display: grid;
  place-items: center;
}
.treasure-lock-card {
  max-width: 620px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(255, 242, 201, .18);
  border-radius: 14px;
  text-align: center;
  background: rgba(21, 13, 52, .7);
}
.treasure-lock-symbol {
  display: block;
  margin-bottom: .75rem;
  color: rgba(255, 216, 77, .72);
  font-size: 2rem;
}
.treasure-lock-card h1,
.treasure-unlocked h1 {
  margin: 0;
  color: #fff2c9;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: .9;
  letter-spacing: -.065em;
}
.treasure-lock-card p {
  color: rgba(255, 242, 201, .68);
  line-height: 1.6;
}
.treasure-unlocked[hidden],
.treasure-locked[hidden] {
  display: none;
}
.treasure-intro {
  max-width: 720px;
  margin: 1rem 0 0;
  color: rgba(255, 242, 201, .7);
  line-height: 1.65;
}
.treasure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.treasure-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 225, 126, .16);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(55, 31, 105, .72), rgba(23, 35, 71, .74));
}
.treasure-card h2 {
  margin: 0 0 .55rem;
  color: #f8f0df;
  font-size: 1.35rem;
}
.treasure-card p {
  max-width: 520px;
  color: rgba(246, 237, 218, .68);
  line-height: 1.55;
}
.treasure-art {
  display: block;
  width: min(230px, 70%);
  height: 160px;
  margin: .8rem auto 0;
  object-fit: contain;
}
.treasure-overcomplete {
  display: none;
  margin-top: 1.5rem;
  padding: 1.3rem;
  border: 1px solid rgba(143, 232, 255, .34);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(29, 59, 91, .68), rgba(58, 31, 101, .7));
}
html.gems-overcomplete .treasure-overcomplete {
  display: block;
}
.treasure-overcomplete h2 {
  margin: 0 0 .5rem;
  color: #dff9ff;
}
.treasure-lost-art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 1rem;
  margin-top: 1rem;
}
.treasure-lost-art img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  filter: saturate(.72) brightness(.9);
}
.treasure-progress {
  margin-top: .8rem;
  color: rgba(255, 242, 201, .52);
  font: .58rem var(--mono);
}
.treasure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.2rem;
}

@media (max-width: 900px) {
  .current-quest-grid { grid-template-columns: 1fr; }
  .current-quest-head { align-items: start; }
  .visual-strip { grid-template-columns: 1fr 1fr; }
  .visual-tile:first-child { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .content-grid,
  .treasure-grid { grid-template-columns: 1fr; }
  .handbook-preview { grid-template-columns: 1fr; }
  .changelog-entry { grid-template-columns: 1fr; gap: .35rem; }
}
@media (max-width: 560px) {
  .visual-strip { grid-template-columns: 1fr; }
  .visual-tile:first-child { grid-column: auto; }
  .treasure-lost-art { grid-template-columns: 1fr; }
  .treasure-lost-art img { height: 170px; }
}


/* Static homepage snapshot used on the SPYR0.DEV project page.
   This avoids weakening the site's frame-ancestors CSP just for an embedded preview. */
.site-shot {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  margin-top: 1.35rem;
  border: 1px solid rgba(226, 211, 168, .16);
  border-radius: 12px;
  background: linear-gradient(180deg, #4f96d2 0%, #7dc9dc 42%, #a17bd1 73%, #4f9e67 100%);
}
.site-shot::before {
  content: '';
  position: absolute;
  right: 8%;
  top: 12%;
  width: 100px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 0 0 18px rgba(255,216,77,.12), 0 0 60px rgba(255,216,77,.35);
}
.site-shot::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -12%;
  height: 31%;
  border-radius: 50% 50% 0 0;
  background: #4c9a61;
  box-shadow: inset 0 15px 0 rgba(119,223,126,.24);
  rotate: -2deg;
}
.site-shot-copy {
  position: absolute;
  z-index: 2;
  left: 7%;
  top: 18%;
}
.site-shot-copy small {
  display: block;
  margin-bottom: .55rem;
  color: #ffd84d;
  font: .55rem var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-shot-copy strong {
  display: block;
  color: #fff2c9;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: .78;
  letter-spacing: -.08em;
  text-shadow: .05em .06em 0 rgba(49,22,96,.28);
}
.site-shot-copy strong span { color: #ffd84d; }
.site-shot-portrait {
  position: absolute;
  z-index: 2;
  right: 8%;
  bottom: 12%;
  width: min(34%, 290px);
  height: 72%;
  overflow: hidden;
  border: 3px solid #ffd84d;
  border-radius: 46% 46% 14% 14%;
  background: linear-gradient(180deg, rgba(105,66,179,.8), rgba(34,18,82,.94));
  box-shadow: 0 0 0 7px rgba(255,216,77,.18), 10px 12px 0 rgba(33,19,79,.18);
}
.site-shot-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.site-shot-crystal {
  position: absolute;
  z-index: 3;
  left: 25%;
  bottom: 2%;
  width: 105px;
  filter: drop-shadow(0 4px 3px rgba(19, 10, 43, .2));
}
.site-shot-label {
  position: absolute;
  z-index: 4;
  left: .8rem;
  bottom: .6rem;
  color: rgba(255,242,201,.7);
  font: .52rem var(--mono);
  letter-spacing: .07em;
}
@media (max-width: 640px) {
  .site-shot { min-height: 360px; }
  .site-shot-copy { left: 6%; top: 17%; }
  .site-shot-copy strong { font-size: clamp(2.4rem, 13vw, 3.8rem); }
  .site-shot-portrait { right: 4%; width: 42%; height: 62%; }
  .site-shot-crystal { left: 16%; width: 86px; }
}


/* Old project archive */
.archive-shelf-page .content-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(135, 113, 198, .12), transparent 32%),
    linear-gradient(180deg, #211641, #17112e);
}
.old-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.35rem;
}
.old-project {
  position: relative;
  min-height: 250px;
  padding: 1.2rem;
  border: 1px solid rgba(226, 211, 168, .14);
  border-radius: 11px;
  background: rgba(255,255,255,.022);
}
.old-project.is-featured {
  background:
    radial-gradient(circle at 86% 12%, rgba(150, 131, 210, .08), transparent 30%),
    rgba(255,255,255,.028);
}
.old-project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .8rem;
}
.old-project-status {
  color: #b8aed9;
  font: .58rem var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.old-project-date {
  color: rgba(239, 233, 218, .45);
  font: .56rem var(--mono);
}
.old-project h3 {
  margin: 0 0 .55rem;
  color: #f4ecda;
  font-size: 1.25rem;
}
.old-project p {
  margin: .4rem 0;
  color: rgba(239, 233, 218, .67);
  line-height: 1.55;
}
.old-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .9rem;
}
.old-project-tags span {
  padding: .26rem .45rem;
  border: 1px solid rgba(188, 179, 220, .14);
  border-radius: 999px;
  color: rgba(213, 207, 231, .62);
  font: .54rem var(--mono);
}
.old-project-link {
  display: inline-flex;
  margin-top: 1rem;
  color: #d4caef;
  font: 700 .63rem var(--mono);
}
.old-project-link:hover,
.old-project-link:focus-visible {
  color: #fff2c9;
}
.archive-note {
  max-width: 800px;
  margin-top: 1.2rem;
  padding: .9rem 1rem;
  border-left: 2px solid rgba(183, 174, 221, .45);
  color: rgba(239, 233, 218, .62);
  background: rgba(120, 100, 176, .04);
  line-height: 1.6;
}
.magic-archive-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(183, 188, 236, .17);
  border-radius: 8px;
  color: #d7d3ee;
  background: rgba(19, 20, 51, .18);
}
.magic-archive-link strong {
  display: block;
  margin-bottom: .25rem;
  color: #eee9f7;
}
.magic-archive-link small {
  display: block;
  color: rgba(221, 217, 239, .55);
  font: .57rem/1.45 var(--mono);
}
.magic-archive-link b {
  color: #b8afe4;
  font-size: 1.2rem;
}

/* Archived project visuals */
.nos-map-shot {
  margin: 1.35rem 0 0;
}
.nos-map-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(226, 211, 168, .15);
  border-radius: 12px;
  background: #1f2023;
}
.nos-map-shot figcaption {
  margin-top: .55rem;
  color: rgba(239, 233, 218, .48);
  font: .56rem/1.5 var(--mono);
}

/* Archived project mockups */
.ptbot-mock,
.twitch-mock {
  margin-top: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(226, 211, 168, .15);
  border-radius: 12px;
  background: #111326;
}
.ptbot-mock {
  padding: 1rem;
  background: #131722;
}
.ptbot-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .75rem;
  color: rgba(236,239,245,.62);
  font: .58rem var(--mono);
}
.ptbot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
}
.pt-server-card {
  padding: .8rem;
  border: 1px solid rgba(159, 177, 205, .14);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}
.pt-server-card strong {
  color: #eff4f8;
  font-size: .85rem;
}
.pt-server-card small {
  display: block;
  margin-top: .25rem;
  color: rgba(221,230,239,.5);
  font: .55rem var(--mono);
}
.pt-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 2px;
  height: 38px;
  margin-top: .65rem;
}
.pt-bars i {
  display: block;
  min-height: 5px;
  background: rgba(121, 173, 210, .58);
}
.pt-bars i:nth-child(3n){height:70%}
.pt-bars i:nth-child(4n){height:42%}
.pt-bars i:nth-child(5n){height:88%}

.twitch-mock {
  background: #181a20;
}
.twitch-mock-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding: .7rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #22252c;
}
.twitch-mock-nav span {
  padding: .4rem .5rem;
  border-radius: 4px;
  color: rgba(245,245,245,.55);
  font: .54rem var(--mono);
}
.twitch-mock-nav span.active {
  color: #fff;
  background: #6f42c1;
}
.twitch-mock-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  min-height: 320px;
  padding: 1rem;
}
.twitch-panel {
  padding: .9rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
}
.twitch-panel h4 {
  margin: 0 0 .6rem;
  color: #f2f2f2;
}
.twitch-panel span {
  display: block;
  margin: .35rem 0;
  padding: .4rem;
  border-radius: 4px;
  color: rgba(245,245,245,.58);
  background: rgba(255,255,255,.03);
  font: .56rem var(--mono);
}

@media (max-width: 800px) {
  .old-projects-grid { grid-template-columns: 1fr; }
  .ptbot-grid,
  .twitch-mock-body { grid-template-columns: 1fr; }
}


/* Consolidated homeworld hierarchy */
.artisans-current {
  margin-top: 1.25rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(214, 184, 120, .18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 88% 10%, rgba(216, 191, 129, .07), transparent 28%),
    rgba(238, 220, 168, .025);
}
.artisans-current h2 {
  margin: .15rem 0 .45rem;
  color: #f2e8cf;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}
.artisans-current-intro {
  max-width: 620px;
  margin: 0 0 1rem;
  color: rgba(244, 239, 222, .68);
  line-height: 1.55;
}
.artisans-current-grid {
  display: grid;
  gap: .65rem;
}
.artisans-current-grid article {
  padding: .8rem .9rem;
  border: 1px solid rgba(214, 184, 120, .12);
  border-radius: 7px;
  background: rgba(21, 48, 50, .18);
}
.artisans-current-grid span {
  color: #d8bf81;
  font: .56rem var(--mono);
  letter-spacing: .06em;
}
.artisans-current-grid h3 {
  margin: .3rem 0 .3rem;
  color: #f2e8cf;
  font-size: .98rem;
}
.artisans-current-grid p {
  margin: 0;
  color: rgba(244, 239, 222, .67);
  font-size: .88rem;
  line-height: 1.5;
}
.artisans-current > small {
  display: block;
  margin-top: .8rem;
  color: rgba(216, 191, 129, .5);
  font: .56rem var(--mono);
}
.dream-log-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1.8rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(221, 173, 217, .18);
  border-left: 2px solid rgba(221, 173, 217, .5);
  border-radius: 8px;
  color: #ecddec;
  background: rgba(89, 53, 100, .12);
}
.dream-log-link strong {
  display: block;
  margin-bottom: .2rem;
  color: #f2e8f0;
}
.dream-log-link small {
  display: block;
  color: rgba(236, 225, 239, .56);
  font: .57rem/1.45 var(--mono);
}
.dream-log-link b {
  color: #d8a8d2;
  font-size: 1.1rem;
}


/* Handbook origin story */
.handbook-origin {
  position: relative;
}
.handbook-origin-steps {
  display: grid;
  gap: .7rem;
  max-width: 820px;
  margin-top: 1.35rem;
}
.handbook-origin-steps article {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(183, 188, 236, .14);
  border-radius: 8px;
  background: rgba(255,255,255,.022);
}
.handbook-origin-steps > article > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(174, 183, 234, .32);
  border-radius: 50%;
  color: #aeb7ea;
  font: .58rem var(--mono);
}
.handbook-origin-steps h3 {
  margin: .05rem 0 .25rem;
  color: #f3ead7;
  font-size: 1rem;
}
.handbook-origin-steps p {
  margin: 0;
  color: rgba(239, 233, 218, .67);
  font-size: .9rem;
  line-height: 1.55;
}
@media (max-width: 560px) {
  .handbook-origin-steps article {
    grid-template-columns: 2.2rem 1fr;
    gap: .65rem;
    padding: .8rem;
  }
}


/* Pterodactyl Discord control demo */
.pt-control-demo {
  display: grid;
  grid-template-columns: 58px 1fr;
  min-height: 430px;
  margin-top: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(132, 150, 188, .18);
  border-radius: 12px;
  background: #1e1f22;
  box-shadow: 0 18px 40px rgba(7, 9, 18, .2);
}
.pt-discord-rail {
  display: grid;
  align-content: start;
  gap: .5rem;
  padding: .7rem .55rem;
  background: #1a1b1e;
  border-right: 1px solid rgba(255,255,255,.05);
}
.pt-discord-server {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(237,239,244,.6);
  background: #303238;
  font: 700 .58rem var(--mono);
}
.pt-discord-server.is-active {
  color: #fff;
  background: #5865f2;
  border-radius: 13px;
}
.pt-discord-channel {
  min-width: 0;
  background: #313338;
}
.pt-channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 48px;
  padding: 0 .9rem;
  border-bottom: 1px solid rgba(0,0,0,.24);
  color: #f2f3f5;
  font-weight: 700;
}
.pt-channel-head small {
  color: rgba(219,222,225,.45);
  font: .55rem var(--mono);
}
.pt-message {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: .65rem;
  padding: 1rem;
}
.pt-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: #3d58a8;
  font: 800 .6rem var(--mono);
}
.pt-message-body {
  min-width: 0;
}
.pt-message-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .45rem;
  color: #f2f3f5;
}
.pt-message-meta span {
  padding: .1rem .3rem;
  border-radius: 3px;
  color: #fff;
  background: #5865f2;
  font: .48rem var(--mono);
}
.pt-message-meta small {
  color: rgba(219,222,225,.42);
  font-size: .68rem;
}
.pt-server-embed {
  max-width: 680px;
  padding: .9rem;
  border-left: 4px solid #57f287;
  border-radius: 4px;
  background: #2b2d31;
}
.pt-server-embed-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .8rem;
}
.pt-server-embed-head strong {
  display: block;
  color: #f2f3f5;
  font-size: .98rem;
}
.pt-server-embed-head small {
  display: block;
  margin-top: .18rem;
  color: rgba(219,222,225,.55);
}
.pt-online-dot {
  color: #57f287;
  font: .54rem var(--mono);
  letter-spacing: .06em;
}
.pt-server-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin-top: .85rem;
}
.pt-server-stats span {
  padding: .55rem;
  border-radius: 5px;
  background: rgba(255,255,255,.028);
}
.pt-server-stats small,
.pt-server-history small {
  display: block;
  margin-bottom: .2rem;
  color: rgba(219,222,225,.42);
  font: .5rem var(--mono);
}
.pt-server-stats b {
  color: #dbdee1;
  font-size: .76rem;
  font-weight: 600;
}
.pt-server-history {
  margin-top: .75rem;
  padding: .6rem;
  border-radius: 5px;
  background: #232428;
}
.pt-server-history code {
  display: block;
  overflow: hidden;
  color: rgba(219,222,225,.72);
  font: .57rem/1.55 var(--mono);
  white-space: nowrap;
}
.pt-control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .75rem;
}
.pt-control-buttons span {
  padding: .45rem .7rem;
  border-radius: 4px;
  color: #f2f3f5;
  background: #4e5058;
  font-size: .68rem;
  font-weight: 700;
}
.pt-control-buttons .is-start { background: #248046; }
.pt-control-buttons .is-stop { background: #da373c; }
.pt-control-buttons .is-restart { background: #5865f2; }

.pt-command-example {
  max-width: 680px;
  margin-top: 1rem;
  padding: .65rem .7rem;
  border-radius: 5px;
  background: #383a40;
}
.pt-command-user {
  display: block;
  margin-bottom: .3rem;
  color: #f2f3f5;
  font-size: .72rem;
  font-weight: 700;
}
.pt-command-example code {
  display: block;
  overflow-x: auto;
  color: #dbdee1;
  font: .6rem var(--mono);
  white-space: nowrap;
}
.pt-command-example code b {
  color: #a9b1d6;
  font-weight: 500;
}
.pt-command-response {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  max-width: 680px;
  margin-top: .55rem;
}
.pt-command-response > span {
  color: #a9b1d6;
  font-size: .72rem;
  font-weight: 700;
}
.pt-command-response p {
  margin: 0;
  color: rgba(219,222,225,.66);
  font-size: .74rem;
}
.pt-command-response strong {
  color: #dbdee1;
}

.pt-control-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin-top: 1rem;
}
.pt-control-notes article {
  padding: .9rem;
  border: 1px solid rgba(159, 177, 205, .14);
  border-radius: 8px;
  background: rgba(255,255,255,.022);
}
.pt-control-notes > article > span {
  color: #8ea9d6;
  font: .54rem var(--mono);
  letter-spacing: .06em;
}
.pt-control-notes h3 {
  margin: .3rem 0 .35rem;
  color: #eef2f7;
  font-size: .95rem;
}
.pt-control-notes p {
  margin: 0;
  color: rgba(230, 235, 242, .65);
  font-size: .86rem;
  line-height: 1.5;
}
.pt-control-notes code,
.pt-code-note code {
  color: #b9c8e6;
  font: .9em var(--mono);
}
.pt-code-sample {
  max-width: 820px;
  overflow-x: auto;
  margin: 1.1rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(128, 151, 199, .17);
  border-radius: 9px;
  color: #d7dfed;
  background: #10131b;
  font: .65rem/1.65 var(--mono);
  white-space: pre;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.pt-code-note {
  margin-top: .8rem !important;
  color: rgba(239,233,218,.6) !important;
  font-size: .88rem;
}
@media (max-width: 760px) {
  .pt-control-demo { grid-template-columns: 1fr; }
  .pt-discord-rail { display: none; }
  .pt-message { grid-template-columns: 1fr; }
  .pt-avatar { display: none; }
  .pt-server-stats,
  .pt-control-notes { grid-template-columns: 1fr; }
}


/* Active project card visuals */
.project-card-visual {
  position: relative;
  width: 100%;
  height: 82px;
  margin: -.15rem 0 1rem;
  overflow: hidden;
  border: 1px solid rgba(204, 202, 236, .13);
  border-radius: 8px;
  background: rgba(8, 10, 35, .2);
}
.project-card-visual::before,
.project-card-visual::after {
  content: '';
  position: absolute;
}
.project-card-visual.is-spyro {
  height: auto;
  aspect-ratio: 1440 / 820;
  background: #17152f;
}
.project-card-visual.is-spyro::before,
.project-card-visual.is-spyro::after {
  display: none;
}
.project-card-visual.is-spyro img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.project-card-visual.is-handbook {
  background: linear-gradient(135deg, #20274d, #34375f);
}
.project-card-visual.is-handbook::before {
  left: 50%;
  top: 12px;
  width: 76px;
  height: 56px;
  border-radius: 3px 7px 7px 3px;
  background: #e8e3d7;
  box-shadow: -7px 4px 0 #b7bfd8, -13px 8px 0 rgba(117, 132, 174, .65);
  transform: translateX(-50%) rotate(-3deg);
}
.project-card-visual.is-handbook::after {
  left: 50%;
  top: 27px;
  width: 38px;
  height: 3px;
  background: #6976a4;
  box-shadow: 0 9px 0 #8f99bb, 0 18px 0 #8f99bb;
  transform: translateX(-50%) rotate(-3deg);
}
.project-card-visual.is-dune {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 7px;
  padding: 8px;
  background: #17162a;
}
.project-card-visual.is-dune::before {
  position: static;
  border-radius: 5px;
  background:
    linear-gradient(#323047 0 0) 50% 12px / 26px 5px no-repeat,
    linear-gradient(#242238 0 0);
}
.project-card-visual.is-dune::after {
  position: static;
  border: 1px solid rgba(195, 179, 130, .16);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(206, 179, 112, .6) 0 24%, transparent 24% 100%) 9px 13px / 76% 7px no-repeat,
    linear-gradient(90deg, rgba(127, 145, 188, .45) 0 62%, transparent 62% 100%) 9px 31px / 70% 5px no-repeat,
    linear-gradient(90deg, rgba(127, 145, 188, .32) 0 42%, transparent 42% 100%) 9px 46px / 80% 5px no-repeat,
    rgba(255,255,255,.018);
}


