/* Sort the Toys — a bright toyshop. Block colors, chunky borders, hard shadows. */

:root {
  --paper: #fff6e9;
  --card: #fffdf7;
  --ink: #33241f;
  --ink-soft: #6e5a51;
  --yellow: #ffc93c;
  --blue: #3aa0ff;
  --coral: #ff6b57;
  --mint: #3ecf8e;
  --choc: #3a2e2a;
  --shadow: 5px 6px 0 rgba(58, 46, 42, .9);
  --round: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    repeating-linear-gradient(90deg, rgba(58,46,42,.035) 0 2px, transparent 2px 56px),
    var(--paper);
  color: var(--ink);
  font: 17px/1.6 "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}

.shell { max-width: 1060px; margin: 0 auto; padding: 0 18px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -1px; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: 1.8em; }

a { color: #1b6fc2; }

/* ---------- topbar: toy blocks ---------- */
.topbar { background: var(--choc); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; }
.logo { display: flex; align-items: center; gap: 7px; text-decoration: none; }
.logo b { color: var(--yellow); font-size: 1.25rem; letter-spacing: -.3px; }
.cube { width: 16px; height: 16px; border-radius: 5px; display: inline-block; border: 2px solid var(--choc); }
.c1 { background: var(--coral); }
.c2 { background: var(--mint); margin-left: -4px; transform: translateY(-5px); }
.c3 { background: var(--blue); margin-left: -4px; transform: translateY(2px); }
.chip {
  color: var(--choc); text-decoration: none; font-weight: 700; font-size: .92rem;
  background: var(--card); border: 2px solid var(--choc); border-radius: 999px;
  padding: 6px 14px; margin-left: 8px; box-shadow: 2px 3px 0 rgba(255, 246, 233, .35);
}
.chip:hover { background: var(--yellow); }

/* ---------- hero: portrait stage + side card ---------- */
.hero { padding: 30px 0 6px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 560px; }

.stage-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }
.stage {
  position: relative;
  width: 100%;
  max-width: 404px;
  aspect-ratio: 404 / 720;
  border: 4px solid var(--choc);
  border-radius: var(--round);
  overflow: hidden;
  background: #7f7fd0;
  box-shadow: var(--shadow);
}
.stage[data-gf-state="playing"] { background: #000; }

.cover { position: absolute; inset: 0; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gobtn {
  position: absolute; left: 50%; bottom: 9%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  font: 800 1.1rem/1 inherit;
  color: var(--choc);
  background: var(--yellow);
  border: 3px solid var(--choc);
  border-radius: 999px;
  padding: 15px 26px;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(58, 46, 42, .55);
  white-space: nowrap;
}
.gobtn:hover { filter: brightness(1.05); }
.gobtn:active { transform: translateX(-50%) translateY(4px); box-shadow: 0 2px 0 rgba(58, 46, 42, .55); }
.go-tri {
  width: 0; height: 0;
  border-left: 13px solid var(--coral);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.stagebtns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.blockbtn {
  font: 800 .95rem/1 inherit;
  color: var(--choc);
  background: var(--card);
  border: 3px solid var(--choc);
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 3px 4px 0 rgba(58, 46, 42, .8);
}
.blockbtn:hover { background: var(--mint); }
.blockbtn:active { transform: translateY(3px); box-shadow: 3px 1px 0 rgba(58, 46, 42, .8); }
.blockbtn.wide { background: var(--blue); color: #fff; border-color: #17497e; }
.like[data-gf-liked], .blockbtn[aria-pressed="true"] { background: var(--coral); color: #fff; border-color: #a33325; }
.likecount { font-weight: 800; }
.sharemsg { font-size: .9rem; color: #1e7a4d; min-width: 90px; }

/* ---------- loader: stacking blocks ---------- */
.loader {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: repeating-linear-gradient(45deg, #8f8fe0 0 26px, #7f7fd0 26px 52px);
}
.stage[data-gf-state="loading"] .loader { display: flex; }
.blocks { display: flex; align-items: flex-end; gap: 8px; height: 84px; }
.blocks span { width: 34px; border: 3px solid var(--choc); border-radius: 9px; }
.b1 { height: 34px; background: var(--yellow); animation: drop1 1.15s ease-in infinite; }
.b2 { height: 44px; background: var(--coral); animation: drop2 1.15s ease-in infinite .18s; }
.b3 { height: 54px; background: var(--blue); animation: drop3 1.15s ease-in infinite .36s; }
@keyframes drop1 { 0%, 15% { transform: translateY(-58px); opacity: 0; } 30%, 100% { transform: none; opacity: 1; } }
@keyframes drop2 { 0%, 15% { transform: translateY(-70px); opacity: 0; } 30%, 100% { transform: none; opacity: 1; } }
@keyframes drop3 { 0%, 15% { transform: translateY(-84px); opacity: 0; } 30%, 100% { transform: none; opacity: 1; } }
.loadtext { color: #fff; font-weight: 800; text-shadow: 0 2px 0 rgba(58, 46, 42, .5); margin: 0; }

/* ---------- side card ---------- */
.hero-side { display: flex; }
.sidecard {
  flex: 1;
  background: var(--card);
  border: 3px solid var(--choc);
  border-radius: var(--round);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.sidetitle { margin: 0 0 12px; font-size: 1.2rem; }
.quicklist { margin: 0; }
.quicklist dt { font-weight: 800; color: var(--coral); text-transform: uppercase; font-size: .78rem; letter-spacing: .8px; margin-top: 12px; }
.quicklist dd { margin: 2px 0 0; color: var(--ink); }
.sideplay {
  display: block; text-align: center; margin-top: 20px;
  font: 800 1.05rem/1 inherit; text-decoration: none;
  color: #fff; background: var(--mint);
  border: 3px solid var(--choc); border-radius: 999px;
  padding: 14px 20px; box-shadow: 4px 5px 0 rgba(58, 46, 42, .8);
}
.sideplay:hover { filter: brightness(1.06); }

/* ---------- body: two columns ---------- */
.bodygrid { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 26px 0 10px; }
.copy {
  background: var(--card);
  border: 3px solid var(--choc);
  border-radius: var(--round);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 38px);
}
.copy h2 { color: var(--choc); }
.copy img { max-width: 100%; height: auto; border: 3px solid var(--choc); border-radius: 14px; }
.copy figure { margin: 1.4em 0; }
.copy figcaption { color: var(--ink-soft); font-size: .9rem; padding-top: 8px; }
.copy ul, .copy ol { padding-left: 1.3em; }
.copy li { margin: .35em 0; }
.copy a { font-weight: 700; }
.copy.flat { margin: 26px 0; }
.copy.paper { background: var(--card); }
.paper-date { color: var(--ink-soft); font-size: .92rem; }

/* ---------- faq folds ---------- */
.fold {
  border: 3px solid var(--choc);
  border-radius: 16px;
  background: var(--paper);
  margin: 12px 0;
  padding: 12px 18px;
  box-shadow: 3px 4px 0 rgba(58, 46, 42, .55);
}
.fold:nth-child(4n+1) summary::before { content: "🧸 "; }
.fold:nth-child(4n+2) summary::before { content: "🚂 "; }
.fold:nth-child(4n+3) summary::before { content: "🧩 "; }
.fold:nth-child(4n+4) summary::before { content: "🎈 "; }
.fold summary { cursor: pointer; font-weight: 800; }
.fold[open] { background: #fff; }
.fold p { margin: 10px 0 2px; color: var(--ink-soft); }

/* ---------- comments wall ---------- */
.talk {
  background: var(--card);
  border: 3px solid var(--choc);
  border-radius: var(--round);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 38px);
  align-self: start;
}
.talk h2 { margin-top: 0; }
.postbox input, .postbox textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 3px solid var(--choc); border-radius: 14px;
  padding: 10px 14px; background: var(--paper);
}
.postbox input { margin-bottom: 10px; }
.postbox button {
  margin-top: 12px;
  font: 800 1rem/1 inherit; color: #fff;
  background: var(--coral);
  border: 3px solid var(--choc); border-radius: 999px;
  padding: 12px 28px; cursor: pointer;
  box-shadow: 4px 5px 0 rgba(58, 46, 42, .8);
}
.postbox button:active { transform: translateY(3px); box-shadow: 4px 2px 0 rgba(58, 46, 42, .8); }
.postmsg { min-height: 1.2em; color: #1e7a4d; font-weight: 700; }
.note {
  border: 3px solid var(--choc); border-radius: 16px;
  background: var(--paper); padding: 12px 16px; margin: 12px 0;
}
.note header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.note time { color: var(--ink-soft); font-size: .85rem; }
.note.sub { margin-left: 24px; background: #fff; }
.ownertag {
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: #fff; background: var(--blue); border: 2px solid var(--choc);
  border-radius: 999px; padding: 2px 9px;
}
.note[data-gf-owner] .ownertag[hidden] { display: inline-block; }
.replylink { font: inherit; font-size: .85rem; font-weight: 800; color: #1b6fc2; background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; }
.wall-empty { color: var(--ink-soft); }

/* ---------- inner pages ---------- */
.inner { padding-top: 26px; }
.missing { text-align: center; }
.missing-face { font-size: 3.2rem; margin: 0; }

/* ---------- footer ---------- */
.basebar { background: var(--choc); margin-top: 34px; padding: 26px 0 34px; }
.basebrand { color: var(--yellow); font-weight: 800; font-size: 1.15rem; margin: 0 0 12px; }
.basenav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.basenav a { color: #f3e3d3; font-size: .92rem; text-decoration: none; }
.basenav a:hover { color: var(--yellow); }
.basenote { color: #b39a8b; font-size: .85rem; margin-top: 16px; }

/* ---------- desktop layout ---------- */
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.25fr .95fr; align-items: start; }
  .bodygrid { grid-template-columns: 1.35fr .9fr; align-items: start; }
  .stage-wrap { flex-direction: column; }
  /* portrait stage: cap by viewport height so the cover and its Start button stay on the first screen */
  .stage { width: min(100%, calc((100vh - 250px) * 0.561)); }
}
@media (max-width: 640px) {
  .gobtn { font-size: 1rem; padding: 13px 20px; }
  .sharemsg { min-width: 0; }
  .topnav .chip { margin-left: 4px; padding: 5px 10px; }
}
