:root {
  --cream: #fff4dc;
  --paper: #fffdf6;
  --ink: #1e1631;
  --soft: #5b4f70;
  --lime: #b8f23a;
  --pink: #ff4fa3;
  --sky: #45c6ff;
  --sun: #ffd23f;
  --line: 3px solid var(--ink);
  --pop: 4px 4px 0 var(--ink);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  background-image: linear-gradient(rgba(30, 22, 49, .05) 2px, transparent 2px), linear-gradient(90deg, rgba(30, 22, 49, .05) 2px, transparent 2px);
  background-size: 36px 36px;
  color: var(--ink);
  font: 17px/1.65 var(--round);
}
a { color: #b4006b; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* bar */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 12px 16px; background: var(--ink); color: var(--paper); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); font-weight: 900; font-size: 1.15rem; text-decoration: none; letter-spacing: .01em; }
.logo:hover { color: var(--lime); }
.logo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 26px; height: 26px; padding: 3px; background: var(--paper); border-radius: 7px; }
.logo-grid i { border-radius: 3px; background: var(--lime); }
.logo-grid i:nth-child(2) { background: var(--pink); }
.logo-grid i:nth-child(3) { background: var(--sky); }
.logo-grid i:nth-child(4) { background: var(--sun); }
.bar-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.bar-nav a { color: var(--paper); font-weight: 700; text-decoration: none; }
.bar-nav a:hover { color: var(--lime); }

.wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; }

/* top */
.top { text-align: center; padding: 6px 0 14px; }
.top h1 { margin: 0; font-size: clamp(1.9rem, 6vw, 3.1rem); line-height: 1.1; font-weight: 900; letter-spacing: -.01em; }
.lede { max-width: 720px; margin: 10px auto 12px; color: var(--soft); font-size: 1.05rem; }
.stamp { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; }
.stamp span { padding: 3px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: .85rem; font-weight: 800; }
.stamp span:nth-child(1) { background: var(--lime); }
.stamp span:nth-child(2) { background: var(--sun); }

/* bench (tool frame) */
.bench { margin: 8px 0 26px; }
.stage { position: relative; height: 600px; border: var(--line); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); background: var(--paper); overflow: hidden; }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.loader { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--paper); font-weight: 800; }
.stage[data-gf-state="loading"] .loader, .stage:not([data-gf-state]) .loader { display: flex; }
.loader p { margin: 0; }
.mix { display: flex; gap: 8px; }
.mix i { width: 22px; height: 22px; border: var(--line); border-radius: 7px; background: var(--lime); animation: hop .9s ease-in-out infinite; }
.mix i:nth-child(2) { background: var(--pink); animation-delay: .15s; }
.mix i:nth-child(3) { background: var(--sky); animation-delay: .3s; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .mix i { animation: none; } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border: var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: 800 .95rem var(--round); text-decoration: none; cursor: pointer; box-shadow: var(--pop); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.go { background: var(--lime); }
.like[aria-pressed="true"] { background: var(--pink); color: #fff; }
.count:empty { display: none; }
.share-msg { font-weight: 700; color: var(--soft); }

/* cards */
.card { margin: 0 0 24px; padding: 22px 20px; border: var(--line); border-radius: 22px; background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
.card h2 { margin: 0 0 10px; font-size: 1.45rem; line-height: 1.25; font-weight: 900; }
.prose h2 { margin-top: 28px; padding-top: 4px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 22px 0 6px; font-size: 1.15rem; }
.prose p, .prose li { max-width: 72ch; }
.prose img { max-width: 100%; height: auto; border: var(--line); border-radius: 14px; }
.prose code, .codes b { padding: 1px 6px; border-radius: 6px; background: var(--sun); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; font-weight: 800; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 2px solid rgba(30, 22, 49, .15); text-align: left; }
.note { color: var(--soft); margin-top: 0; }
.doc h1 { margin: 0 0 14px; font-size: 2rem; line-height: 1.15; font-weight: 900; }
.back { margin-top: 26px; font-weight: 800; }

/* recipe table */
.table-scroll { overflow-x: auto; max-height: 640px; overflow-y: auto; border: 2px solid var(--ink); border-radius: 14px; }
.recipes { width: 100%; border-collapse: collapse; font-size: .95rem; }
.recipes thead th { position: sticky; top: 0; background: var(--ink); color: var(--paper); text-align: left; padding: 9px 12px; }
.recipes th[scope="row"] { text-align: left; font-weight: 800; }
.recipes th[scope="row"], .recipes td { padding: 8px 12px; border-bottom: 1px solid rgba(30, 22, 49, .14); vertical-align: top; }
.recipes tbody tr:nth-child(even) { background: rgba(184, 242, 58, .16); }

/* codes list on home */
.codes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; }
.code.active { background: rgba(184, 242, 58, .35); }
.code.expired { opacity: .7; }
.code em { margin-left: auto; font-style: normal; font-weight: 800; font-size: .85rem; }

/* faq */
.faq details { border-top: 2px dashed rgba(30, 22, 49, .25); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { margin: 8px 0 0; }

/* comments */
.talk-count:empty { display: none; }
.cform { display: grid; gap: 10px; }
.cform input, .cform textarea { width: 100%; padding: 10px 12px; border: var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
.cform-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cmsg { font-weight: 700; color: var(--soft); }
.replying { display: none; font-weight: 700; }
.cform[data-gf-replying] .replying { display: block; }
.link { border: 0; background: none; padding: 0; color: #b4006b; font: 700 .9rem var(--round); cursor: pointer; text-decoration: underline; }
.clist, .c-replies { list-style: none; margin: 16px 0 0; padding: 0; }
.c { padding: 12px 0; border-top: 2px dashed rgba(30, 22, 49, .2); }
.c-replies { margin: 6px 0 0 18px; }
.c-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .9rem; }
.c-head time { color: var(--soft); }
.c-owner { display: none; padding: 0 8px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 800; font-size: .78rem; }
.c[data-gf-owner] > .c-head .c-owner { display: inline; }
.c[data-gf-owner] > .c-text { background: rgba(255, 79, 163, .1); border-left: 4px solid var(--pink); padding: 4px 10px; }
.c-to:empty { display: none; }
.c-text { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.invite, .closed { display: none; color: var(--soft); margin: 12px 0 0; }
.talk:has([data-gf-empty]) .invite { display: block; }
.talk:has([data-gf-off]) .closed { display: block; }
.talk:has([data-gf-off]) .cform { display: none; }

/* footer */
.foot { background: var(--ink); color: #d8cfe8; }
.foot-in { max-width: 980px; margin: 0 auto; padding: 26px 16px 34px; font-size: .9rem; }
.foot-brand { margin: 0 0 6px; color: var(--paper); font-weight: 900; font-size: 1.1rem; }
.foot-note { max-width: 70ch; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; }
.foot a { color: var(--lime); }
.foot-copy { margin: 0; }

.lost { text-align: center; margin-top: 30px; }
.lost h1 { font-size: 2rem; margin: 0 0 8px; }

/* hub (tool inside the iframe) */
.bare { background: var(--paper); background-image: none; font-size: 16px; }
.hub { padding: 14px 14px 18px; }
.hub-codes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--sun); }
.codes-label { font-weight: 900; font-size: .9rem; margin-right: 4px; }
.code-chip { padding: 4px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font: 800 .9rem ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.code-chip:hover { background: var(--lime); }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { flex: 1; padding: 10px 8px; border: var(--line); border-radius: 14px; background: var(--paper); font: 900 .98rem var(--round); color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--lime); }
.hub-tip { margin: 0 0 10px; color: var(--soft); font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips-label { flex-basis: 100%; margin-top: 6px; font-weight: 900; font-size: .85rem; color: var(--soft); }
.chip { padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 700 .9rem var(--round); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--lime); box-shadow: 2px 2px 0 var(--ink); }
#q { width: 100%; padding: 12px 14px; border: var(--line); border-radius: 14px; font: 700 1rem var(--round); }
.hub-count { margin: 14px 0 6px; font-weight: 900; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.r { display: grid; gap: 6px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
.r-name { font-size: 1.02rem; }
.r-ing, .r-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mini { padding: 1px 9px; border-radius: 999px; background: rgba(69, 198, 255, .25); font-size: .85rem; font-weight: 700; }
.mini.on { background: var(--lime); }
.tag { padding: 1px 9px; border: 2px solid var(--ink); border-radius: 8px; font-size: .8rem; font-weight: 800; }
.tag.cash { background: var(--sun); }
.hub-foot { margin: 16px 0 0; color: var(--soft); font-size: .8rem; text-align: center; }

@media (min-width: 760px) {
  .stage { height: 640px; }
  .card { padding: 28px 30px; }
  .results { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .stage { height: 560px; border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
  .card { padding: 18px 16px; border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
}
