:root {
  --ink: #26263a;
  --desk: #b98a5a;
  --paper: #fdfbf3;
  --yellow: #fff27a;
  --blue: #c7e6ff;
  --red: #e8414f;
  --sketch: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: 18px;
  background-color: var(--desk);
  background-image:
    repeating-linear-gradient(92deg, rgba(0,0,0,.05) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(88deg, rgba(255,255,255,.04) 0 1px, transparent 1px 23px),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.18), transparent 60%);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 4px;
  max-width: 1240px;
  margin: 0 auto;
}
h1 {
  margin: 0;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(30px, 5vw, 48px);
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
  letter-spacing: 1px;
  white-space: nowrap;
}
h1 span { color: #ffd43b; }
button.wallet { cursor: pointer; font: inherit; color: var(--ink); }
button.wallet span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
button.wallet small { font-family: "Permanent Marker", cursive; font-size: 12px; color: var(--red); margin-top: 3px; letter-spacing: .5px; }
.wd-card { width: min(440px, 94vw); text-align: left; }
.wd-card h3 { text-align: center; }
.wd-balance { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; padding: 8px 12px; background: var(--yellow); transform: rotate(-.6deg); }
.wd-balance b { display: block; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 22px; }
.wd-balance small { font-size: 14px; color: #555; }
.wd-field { display: block; margin-bottom: 10px; }
.wd-field > span:first-child { display: block; font-size: 15px; color: #555; margin-bottom: 2px; }
.wd-field input { width: 100%; font: inherit; font-size: 18px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: var(--sketch); background: #fff; color: var(--ink); }
.wd-amount-row { display: flex; gap: 8px; }
.wd-amount-row input { flex: 1; }
.wd-calc { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 16px; margin-bottom: 6px; }
.wd-calc .recv { color: #2d7a43; }
.wd-calc .wd-tiers { grid-column: 1 / -1; color: #666; }
.card p.wd-rules { font-size: 14px; color: #555; margin: 4px 0 8px; line-height: 1.25; }
.card p.wd-cooldown { font-size: 15px; background: #ffe0e0; padding: 6px 10px; margin: 0 0 8px; }
.card p.wd-msg { font-size: 15px; min-height: 20px; margin: 6px 0; color: #8a3a55; }
#wdList h4 { margin: 6px 0 4px; font-family: "Permanent Marker", cursive; font-weight: normal; }
.wd-item { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; font-size: 14px; padding: 4px 0; border-bottom: 2px dashed rgba(38,38,58,.2); }
.wd-item b { font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 12px; }
.wd-item b.paid { color: #2d7a43; }
.wd-item b.pending, .wd-item b.processing { color: #b07a00; }
.wd-close { display: block; margin: 10px auto 0; }
.wd-ask { text-align: center; }
.card p.wd-ask-q { font-size: 18px; line-height: 1.3; margin: 4px 0 14px; padding: 10px 12px; background: var(--yellow); transform: rotate(.5deg); }
.wd-ask button.big { display: block; width: 100%; margin: 0 0 10px; }
.wd-ask button.big small { display: block; font-family: inherit; font-size: 14px; opacity: .75; margin-top: 2px; }
.wd-ask button.alt { background: #fff; }
.wd-ask #wdOtherBox { text-align: left; margin-top: 4px; }
.wd-back { display: block; margin: 0 auto; }
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 30;
  max-width: min(520px, 92vw);
  padding: 10px 16px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 4px 6px 0 rgba(0,0,0,.25);
  font-size: 18px;
  text-align: center;
}
.side-top { display: flex; align-items: stretch; gap: 10px; margin-bottom: 18px; }
.side-top .wallet { flex: 1; justify-content: center; font-size: 30px; padding: 8px 14px; }
.side-top .wallet .ink-drop { width: 22px; height: 22px; }
.side-top button { font-size: 18px; padding: 6px 12px; }
.side-top .addr { font-size: 17px; }
.wallet {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  padding: 6px 16px;
  font-size: 22px;
  box-shadow: 3px 4px 0 rgba(0,0,0,.25);
  transform: rotate(1deg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.wallet b { font-family: "Permanent Marker", cursive; font-weight: normal; }
.ink-drop {
  width: 16px; height: 16px;
  background: #3557c9;
  border: 2px solid var(--ink);
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  display: inline-block;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px 40px;
  align-items: start;
}
.notebook {
  position: relative;
  background: var(--paper);
  padding: 34px 16px 10px;
  border-radius: 4px 4px 8px 8px;
  box-shadow: 0 2px 0 #e6e1d2, 0 4px 0 #ddd6c4, 0 6px 0 #d2cab6, 8px 14px 24px rgba(0,0,0,.35);
  transform: rotate(-.5deg);
}
.spiral {
  position: absolute;
  top: -12px; left: 18px; right: 18px;
  height: 30px;
  background:
    radial-gradient(circle at 50% 70%, #9a8f7e 0 5px, transparent 6px) 0 0 / 34px 30px repeat-x,
    linear-gradient(transparent 0 0);
}
.spiral::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 13px, #555 13px 17px, transparent 17px 34px);
  -webkit-mask: linear-gradient(#000 0 60%, transparent 60%);
  mask: linear-gradient(#000 0 60%, transparent 60%);
  border-radius: 6px;
}
#board {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
.page-foot {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px 0;
  font-size: 20px;
  color: #6b6b80;
}
#pageLabel { font-family: "Permanent Marker", cursive; color: var(--red); }
.note {
  position: relative;
  padding: 18px 18px 16px;
  margin-bottom: 22px;
  box-shadow: 4px 8px 14px rgba(0,0,0,.3);
}
.note::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  width: 90px; height: 26px;
  margin-left: -45px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
  transform: rotate(-3deg);
}
.note.yellow { background: var(--yellow); transform: rotate(.8deg); }
.note h2 {
  margin: 0 0 10px;
  font-family: "Permanent Marker", cursive;
  font-weight: normal;
  font-size: 26px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.note h2 small { font-family: "Patrick Hand", cursive; font-size: 20px; }
.note p { margin: 0 0 8px; line-height: 1.25; }
button {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 2px 3px 0 var(--ink);
  transition: transform .08s;
}
button:hover { transform: rotate(-1.5deg) scale(1.03); }
button:active { transform: translate(2px, 3px); box-shadow: none; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button.big {
  width: 100%;
  font-family: "Permanent Marker", cursive;
  font-size: 19px;
  padding: 10px;
  background: #ffd43b;
}
button.small { font-size: 16px; padding: 3px 10px; }
.row { display: flex; gap: 8px; margin: 10px 0 6px; }
.row button { flex: 1; }
.hero-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 52vh;
  overflow-y: auto;
}
.hero-list li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 2px;
  border-bottom: 2px dashed rgba(38,38,58,.25);
}
.hero-list li.resting { opacity: .6; }
.hero-list canvas { width: 46px; height: 46px; }
.hname { font-size: 19px; line-height: 1; }
.hname em { font-style: normal; font-size: 14px; margin-left: 4px; }
.hstats { font-size: 14px; color: #555; }
.bar {
  height: 10px;
  margin-top: 3px;
  border: 2px solid var(--ink);
  border-radius: var(--sketch);
  overflow: hidden;
  background: #fff;
}
.bar i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(-45deg, #3aa856 0 4px, #6fd08a 4px 7px);
  transition: width .25s;
}
.hero-list li.resting .bar i { background: repeating-linear-gradient(-45deg, #2f7de1 0 4px, #7fb0f0 4px 7px); }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(30,20,10,.55);
  display: grid;
  place-items: center;
  z-index: 10;
}
.modal.hidden { display: none; }
.card {
  position: relative;
  width: min(320px, 90vw);
  background: var(--paper);
  padding: 22px 22px 18px;
  text-align: center;
  box-shadow: 8px 14px 30px rgba(0,0,0,.45);
  animation: pop .35s cubic-bezier(.2,1.6,.4,1);
  transform: rotate(-1.5deg);
}
.tape {
  position: absolute;
  top: -14px; left: 50%;
  width: 110px; height: 28px;
  margin-left: -55px;
  background: rgba(255,240,150,.75);
  transform: rotate(4deg);
}
#cardCanvas { width: 160px; height: 160px; }
.card h3 { margin: 4px 0 0; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 28px; }
.card p { margin: 0 0 8px; font-size: 20px; }
.card ul { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 18px; text-align: left; }
.tag {
  font-family: "Permanent Marker", cursive;
  font-size: 13px;
  padding: 2px 7px;
  border: 2px solid var(--ink);
  border-radius: var(--sketch);
  transform: rotate(-3deg);
  white-space: nowrap;
}
.tag.on { background: #b9f0c6; }
.tag.ready { background: #ffd43b; }
.tag.nap { background: #c7e6ff; }
.bench-note {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: #ffc6d9;
  transform: rotate(-.6deg);
  box-shadow: 4px 8px 14px rgba(0,0,0,.3);
}
.bench-note:hover { transform: rotate(.6deg) scale(1.02); }
.bench-note:active { transform: translate(2px, 3px); box-shadow: 2px 4px 8px rgba(0,0,0,.3); }
.bench-note p { margin: 0; }
.open-hint { display: block; margin-top: 4px; font-size: 15px; color: #8a3a55; }
.tag.boost { background: #ffe680; }
.tag.home { background: #c9f2c7; }
.note.green, .bench-note.green { background: #c9f2c7; transform: rotate(.7deg); }
#houseMini { display: block; width: 100%; max-width: 320px; height: auto; margin: -2px 0 4px; }
.house-card { width: min(720px, 95vw); }
.house-card h3 { text-align: center; }
#houseGrid {
  list-style: none;
  padding: 0;
  margin: 6px 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  max-height: 62vh;
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
}
#houseGrid li {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--sketch);
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-image: repeating-linear-gradient(transparent 0 23px, rgba(70,130,220,.15) 23px 24px);
}
#houseGrid canvas { width: 120px; height: 100px; align-self: center; }
#houseGrid h4 { margin: 0; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 19px; text-align: center; }
.hfacts { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-size: 16px; }
.hfacts .boost { color: #b07a00; font-weight: bold; }
.hmeta { font-size: 14px; color: #666; text-align: center; }
#houseGrid .mint-btn { flex-direction: row; justify-content: space-between; margin-top: 4px; font-size: 16px; }
#houseGrid .mint-btn b { color: inherit; }
.bench-card { width: min(520px, 94vw); text-align: left; }
.bench-card h3 { text-align: center; }
.autopilot {
  background: var(--yellow);
  padding: 8px 12px 6px;
  margin: 8px 0 10px;
  transform: rotate(-.6deg);
  box-shadow: 2px 3px 6px rgba(0,0,0,.18);
  font-size: 15px;
  line-height: 1.25;
}
.autopilot > b { font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 17px; }
.autopilot p { margin: 2px 0 4px; font-size: 15px; }
.card .autopilot ul { display: block; margin: 0; padding-left: 18px; list-style: disc; font-size: 15px; }
.autopilot li { margin-bottom: 2px; }
.bench-card h3 small { font-family: "Patrick Hand", cursive; font-size: 20px; }
#benchList { display: block; max-height: 58vh; margin: 0 0 14px; overflow-x: hidden; }
.mint-area { display: flex; gap: 10px; align-items: stretch; }
.mint-btns { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mint-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  background: #ffd43b;
  font-family: "Permanent Marker", cursive;
  font-size: 18px;
}
.mint-btn.alt { background: #fff; }
.mint-btn span { white-space: nowrap; }
@media (min-width: 901px) {
  .mint-btn { flex-direction: column; justify-content: center; gap: 3px; padding: 6px; }
}
.mint-btn b { font-weight: normal; color: var(--red); }
.mint-btn em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  font-family: "Patrick Hand", cursive;
  font-size: 17px;
  background: rgba(255,255,255,.75);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 8px;
}
.mint-btn .ink-drop { width: 10px; height: 10px; border-width: 1.5px; }
.odds-note {
  flex: 0 0 118px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--sketch);
  padding: 5px 8px;
  transform: rotate(2deg);
  box-shadow: 2px 3px 0 rgba(0,0,0,.2);
  background-image: repeating-linear-gradient(transparent 0 15px, rgba(70,130,220,.2) 15px 16px);
}
.odds-note h4 { margin: 0 0 2px; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 13px; }
#odds { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 16px; }
#odds li { display: flex; align-items: center; gap: 4px; }
#odds i { width: 8px; height: 8px; border: 1.5px solid var(--ink); border-radius: 50%; flex: none; }
#odds b { margin-left: auto; font-weight: normal; font-family: "Permanent Marker", cursive; }
.note h2 small { font-size: 16px; }
.modal .multi { display: none; }
.modal.pack .single { display: none; }
.modal.pack .multi { display: block; }
.modal.pack .card { width: min(560px, 94vw); }
#packGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-height: 60vh;
  overflow-y: auto;
  text-align: center;
  margin: 8px 0 14px;
}
#packGrid li { display: flex; flex-direction: column; align-items: center; font-size: 14px; line-height: 1.1; }
#packGrid canvas { width: 56px; height: 56px; }
#packGrid b { font-weight: normal; font-size: 15px; }
@media (max-width: 500px) { #packGrid { grid-template-columns: repeat(3, 1fr); } }
#cardRar .pop, #packGrid li.pop b, #packGrid li.pop span { display: inline-block; }
#cardName.pop, #cardRar .pop, #packGrid li.pop b, #packGrid li.pop span { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
#cardStats { min-height: 84px; }
#packGrid span { min-height: 15px; }
.board-wrap { position: relative; perspective: 2400px; }
.page-head {
  height: 64px;
  margin: -6px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid rgba(232,65,79,.5);
}
.ca {
  font-family: "Permanent Marker", cursive;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 14px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 2px 3px 0 var(--ink);
  transform: rotate(-1deg);
}
.ca:hover { text-decoration: underline; }
.flip-sheet {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  animation: pageflip .9s cubic-bezier(.5, .05, .45, .95) forwards;
}
.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--paper);
  overflow: hidden;
}
.flip-front canvas.snap { display: block; width: 100%; height: 100%; }
.flip-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.18), transparent 60%);
  opacity: 0;
  animation: flipshade .9s forwards;
}
.flip-back {
  transform: rotateX(180deg);
  background-color: #f4f0e4;
  background-image:
    linear-gradient(rgba(70,130,220,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,130,220,.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,.12), transparent 40%);
  background-size: 12px 12px, 12px 12px, 100% 100%;
}
.flip-overlay { position: absolute; inset: 0; }
.flip-overlay.login { display: flex; align-items: center; justify-content: center; }
.flip-overlay.picker { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(253,251,243,.82); }
@keyframes pageflip {
  0% { transform: rotateX(0deg); }
  85% { opacity: 1; }
  100% { transform: rotateX(176deg); opacity: 0; }
}
@keyframes flipshade { 50% { opacity: 1; } 100% { opacity: .4; } }
@keyframes pop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.hidden { display: none !important; }
.login { display: none; }
body.locked .login {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box { text-align: center; max-width: 380px; transform: rotate(-2deg); }
.login-box h2 {
  margin: 0 0 6px;
  font-family: "Permanent Marker", cursive;
  font-weight: normal;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1;
  color: var(--ink);
}
.login-box p { margin: 0 0 16px; font-size: 20px; color: #555; }
.login-box button.big { font-size: 24px; padding: 14px; }
body.locked .side > :not(.side-top), body.hub .side > :not(.side-top) { opacity: .45; filter: grayscale(.4); pointer-events: none; }
body.locked .page-foot, body.locked .wallet, body.hub .page-foot, body.hub .wallet { visibility: hidden; }
.picker { display: none; }
body.hub .picker {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(253,251,243,.82);
}
.picker h2 { margin: 0; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: clamp(26px, 3vw, 40px); transform: rotate(-1.5deg); }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, min(220px, 28cqh))); gap: 16px 22px; width: 100%; justify-content: center; }
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 10px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 3px 4px 0 var(--ink);
  font: inherit;
  color: var(--ink);
}
.game-card:nth-child(2) { transform: rotate(1.2deg); }
.game-card:nth-child(3) { transform: rotate(-1deg); }
.game-card:nth-child(4) { transform: rotate(.8deg); }
.game-card canvas { width: 100%; aspect-ratio: 200 / 130; height: auto; border: 2px solid rgba(38,38,58,.25); border-radius: 4px; }
.game-card b { font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 22px; line-height: 1.1; }
.game-card.locked { opacity: .6; box-shadow: none; cursor: not-allowed; }
button.game-card { background: #fff27a; }
@media (max-width: 900px) {
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 130px)); gap: 8px 12px; }
  .picker h2 { font-size: 22px; }
  .game-card { padding: 5px 5px 6px; }
  .game-card b { font-size: 16px; }
  .game-card .tag { font-size: 10px; }
}
.addr { font-family: "Permanent Marker", cursive; font-size: 15px; white-space: nowrap; }
.wallet-card { width: min(380px, 92vw); }
#walletList { display: block; list-style: none; padding: 0; margin: 10px 0; text-align: left; }
#walletList li { margin-bottom: 8px; }
.wallet-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 2px 3px 0 var(--ink);
}
.wallet-opt.off { opacity: .6; box-shadow: none; }
.wallet-opt canvas { width: 34px; height: 34px; flex: none; }
.wallet-opt span { flex: 1; text-align: left; }
#walletMsg { min-height: 22px; font-size: 16px; color: #8a3a55; }
@media (max-width: 900px) {
  .login-box { background: rgba(253,251,243,.88); padding: 12px; }
}
.side-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: end; }
#houseNote { padding-top: 16px; padding-bottom: 14px; box-shadow: 6px 10px 18px rgba(0,0,0,.35), 0 0 0 3px rgba(58,168,86,.35); }
#houseNote h2 { font-size: 26px; }
#houseNote .open-hint { font-family: "Permanent Marker", cursive; font-size: 16px; color: #2d7a43; }
@media (prefers-reduced-motion: no-preference) {
  #houseNote { animation: houseWiggle 4s ease-in-out infinite; }
}
@keyframes houseWiggle { 0%, 88%, 100% { transform: rotate(.7deg); } 92% { transform: rotate(-1.5deg) scale(1.03); } 96% { transform: rotate(1.8deg) scale(1.03); } }
.side-row .bench-note { margin: 0; padding: 12px 12px 10px; }
.side-row .bench-note h2 { font-size: 22px; margin-bottom: 4px; }
.side-row .bench-note p { font-size: 15px; line-height: 1.15; }
@media (min-width: 901px) {
  body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
  .top { flex: none; width: 100%; max-width: none; padding: 8px 28px 0; }
  h1 { font-size: 38px; }
  main {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    grid-template-columns: auto 360px;
    grid-template-rows: minmax(0, 1fr);
    justify-content: center;
    gap: 24px;
    padding: 18px 28px 20px;
    align-items: stretch;
    container-type: size;
  }
  .board-col { min-height: 0; display: flex; align-items: center; }
  .notebook { width: min(calc(100cqw - 384px), calc((100cqh - 150px) * 720 / 564 + 32px)); }
  .side { min-height: 0; display: flex; flex-direction: column; gap: 16px; }
  .side-top { flex: none; margin: 0; }
  .side .note { margin: 0; padding: 14px 14px 12px; }
  .note.yellow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .note.yellow .hero-list { flex: 1; min-height: 0; max-height: none; }
  .side-row { flex: none; }
}
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; padding: 10px 16px 30px; }
  .top { padding: 12px 16px 4px; }
  .notebook { padding: 28px 8px 8px; transform: none; }
  .page-head { height: 44px; }
  .ca { font-size: 15px; }
  .hero-list { max-height: none; }
}
.ref-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 10px;
  background: #ffd43b;
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 4px 5px 0 var(--ink);
  transform: rotate(1.5deg);
  text-align: left;
  animation: ref-wiggle 3.2s ease-in-out infinite;
}
.ref-btn span:last-child { display: flex; flex-direction: column; line-height: 1.05; font-family: "Permanent Marker", cursive; font-size: 19px; }
.ref-btn b { font-weight: normal; color: var(--red); font-size: 20px; }
.ref-btn small { font-family: "Patrick Hand", cursive; font-size: 14px; }
.ref-gift { font-size: 30px; line-height: 1; }
@keyframes ref-wiggle { 0%, 82%, 100% { transform: rotate(1.5deg); } 86% { transform: rotate(-3deg) scale(1.06); } 90% { transform: rotate(4deg) scale(1.06); } 94% { transform: rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { .ref-btn { animation: none; } }
.login-ref {
  display: block; width: 100%; margin-top: 14px; padding: 10px 12px;
  background: #ffd43b; border: 3px dashed var(--ink); box-shadow: none;
  transform: rotate(1deg); text-align: center;
}
.login-ref b { display: block; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 19px; line-height: 1.15; }
.login-ref span { display: block; font-size: 16px; margin-top: 2px; }
.login-invited { margin: 8px 0 0 !important; font-size: 17px !important; color: #2f8a3a !important; font-weight: bold; }
.ref-card { width: min(460px, 94vw); text-align: left; }
.ref-card h3 { text-align: center; }
.ref-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 10px; }
.ref-level { padding: 8px 10px; background: #ffd43b; border: 2px solid var(--ink); border-radius: var(--sketch); text-align: center; transform: rotate(-1deg); }
.ref-level.l2 { background: var(--blue); transform: rotate(1deg); }
.ref-level b { display: block; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 38px; line-height: 1; color: var(--red); }
.ref-level.l2 b { color: #3557c9; }
.ref-level span { font-size: 15px; line-height: 1.15; display: block; }
.ref-how { font-size: 16px; margin: 0 0 12px; }
.ref-out { text-align: center; }
.ref-out p { margin: 4px 0 10px; }
#refLink { font-size: 15px; }
.ref-code { margin: -4px 0 10px; font-size: 16px; }
.ref-code b { font-family: "Permanent Marker", cursive; font-weight: normal; letter-spacing: 1px; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; text-align: center; }
.ref-stats div { padding: 6px 4px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--sketch); }
.ref-stats b { display: block; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 22px; }
.ref-stats small { font-size: 13px; color: #555; }
.ref-by { font-size: 16px; color: #2f8a3a; margin: 0 0 6px; }
@media (max-width: 600px) {
  .ref-btn { padding: 4px 10px 4px 6px; gap: 6px; }
  .ref-btn span:last-child { font-size: 15px; }
  .ref-btn b { font-size: 13px; }
  .ref-btn span:last-child { min-width: 0; }
  h1 { font-size: 26px; }
  .ref-btn small { display: none; }
  .ref-gift { font-size: 22px; }
  .ref-level b { font-size: 30px; }
}
.mint-area { position: relative; }
.start-arrow { display: none; fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.start-hint { display: none; text-align: center; margin: 4px 0 6px; }
.start-hint b { display: block; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 26px; color: var(--red); transform: rotate(-2deg); }
.start-hint span { display: block; font-size: 17px; line-height: 1.2; margin-top: 4px; }
.start-hint em { font-style: normal; font-family: "Permanent Marker", cursive; }
body.first-hero .start-hint { display: block; }
body.first-hero .start-arrow { display: block; }
.start-arrow.up { width: 110px; height: 82px; margin: 0 auto -4px; }
.start-arrow.side { position: absolute; left: -64px; top: 22%; width: 62px; height: 40px; z-index: 3; }
body.first-hero #mint, body.first-hero #mintPack { animation: mint-call 1.6s ease-in-out infinite; }
body.first-hero #mintPack { animation-delay: .8s; }
@keyframes mint-call { 0%, 100% { box-shadow: 2px 3px 0 var(--ink); } 50% { box-shadow: 2px 3px 0 var(--ink), 0 0 0 5px rgba(232,65,79,.55); } }
@media (prefers-reduced-motion: no-preference) {
  .start-arrow.up { animation: arrow-up 1.2s ease-in-out infinite; }
  .start-arrow.side { animation: arrow-side 1.2s ease-in-out infinite; }
}
@keyframes arrow-up { 50% { transform: translateY(-8px); } }
@keyframes arrow-side { 50% { transform: translateX(8px); } }
@media (max-width: 900px) { .start-arrow.side { display: none !important; } }
@media (min-width: 901px) {
  .note.yellow .start-hint { flex: 0 1 auto; min-height: 0; overflow: hidden; }
}
@media (min-width: 901px) and (max-height: 760px) {
  .start-arrow.up { width: 70px; height: 50px; }
  .start-hint b { font-size: 21px; }
  .start-hint span { display: none; }
}
.side-top { flex-wrap: wrap; }
.side-top .ref-btn { flex: 1 0 100%; order: -1; justify-content: center; padding: 6px 12px; font-size: inherit; }
.side-top .ref-btn span:last-child { font-size: 18px; }
.side-top .ref-btn b { font-size: 18px; }
.game-card.locked.soon { opacity: .9; background: #e9f7df; }
.game-card b small { font-family: "Patrick Hand", cursive; font-size: .62em; color: #3f8f3a; white-space: nowrap; }
.top { justify-content: flex-start; }
.back-btn { display: none; font-family: "Permanent Marker", cursive; font-size: 18px; padding: 6px 14px; transform: rotate(-1.5deg); }
body:not(.locked):not(.hub) .back-btn { display: inline-block; }
@media (max-width: 600px) { .back-btn { font-size: 15px; padding: 4px 10px; } }
.socials { position: fixed; left: 18px; bottom: 18px; z-index: 8; display: flex; flex-direction: column; gap: 12px; }
.social {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 9px;
  color: #fff; text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 4px 5px 0 var(--ink);
  transition: transform .08s;
}
.social.discord { background: #5865F2; transform: rotate(-2deg); }
.social.telegram { background: #229ED9; transform: rotate(1.5deg); }
.social:hover { transform: rotate(-1deg) scale(1.06); }
.social svg { width: 32px; height: 32px; flex: none; }
.social span { display: flex; flex-direction: column; line-height: 1; }
.social b { font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 21px; letter-spacing: .5px; text-shadow: 2px 2px 0 var(--ink); }
.social small { font-size: 14px; margin-top: 2px; }
@media (min-width: 901px) { main { padding-left: 200px; } }
@media (max-width: 900px) {
  .socials { left: 10px; bottom: 10px; flex-direction: row; gap: 8px; }
  .social { padding: 4px 10px 4px 6px; gap: 5px; box-shadow: 3px 4px 0 var(--ink); }
  .social svg { width: 24px; height: 24px; }
  .social b { font-size: 16px; }
  .social small { display: none; }
  main { padding-bottom: 80px; }
}
.launch-timer {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 16px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(-1deg);
  font-family: "Permanent Marker", cursive;
}
.launch-timer span { font-size: 19px; }
.launch-timer em { font-style: normal; }
.launch-timer b { font-weight: normal; font-size: 28px; color: var(--red); letter-spacing: 1px; font-variant-numeric: tabular-nums; min-width: 6.2ch; }
.launch-timer.live { background: #7be38a; }
@media (prefers-reduced-motion: no-preference) { .launch-timer.live { animation: ref-wiggle 1.6s ease-in-out infinite; } }
@media (max-width: 600px) {
  .launch-timer { gap: 8px; padding: 2px 10px; }
  .launch-timer span { font-size: 14px; }
  .launch-timer b { font-size: 20px; }
}
.garden, .seed-note { display: none; }
body.in-garden .garden {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px 12px;
  background: rgba(253,251,243,.94);
  overflow: hidden;
}
body.in-garden .seed-note { display: block; }
body.in-garden .side .note.yellow, body.in-garden .side-row, body.in-garden .page-foot span { display: none; }
body.in-garden .side .seed-note { flex: 1; min-height: 0; overflow-y: auto; }
.garden-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.garden-bar h2 { margin: 0; font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 26px; transform: rotate(-1.5deg); }
.garden-bar h2 small { font-family: "Patrick Hand", cursive; font-size: 16px; color: #3f8f3a; }
.g-test { font-family: "Permanent Marker", cursive; font-size: 12px; padding: 1px 8px; background: #ffd0e2; border: 2px dashed var(--ink); transform: rotate(2deg); }
.g-spacer { flex: 1; }
.garden-bar button { font-size: 16px; padding: 4px 12px; }
.garden-bar button.hot { background: var(--yellow); animation: mint-call 1.4s ease-in-out infinite; }
.g-plots { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; padding: 4px 4px 8px; }
.plot {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  padding: 6px 8px 8px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--sketch);
  box-shadow: 3px 4px 0 var(--ink);
}
.plot:nth-child(3n+1) { transform: rotate(-.6deg); }
.plot:nth-child(3n+2) { transform: rotate(.5deg); }
.plot.empty { background: #f6f1e4; border-style: dashed; box-shadow: none; }
.plot.ready { background: #fff8c9; }
.plot.thirsty { background: #e9f4ff; }
.p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.p-name { font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-pay { font-size: 13px; color: #3f8f3a; white-space: nowrap; }
.p-num { position: absolute; left: 6px; bottom: 76px; font-family: "Permanent Marker", cursive; font-size: 11px; padding: 0 6px; background: #f0956a; border: 1.5px solid var(--ink); transform: rotate(-4deg); }
.plot canvas { width: 100%; aspect-ratio: 200 / 130; height: auto; }
.p-bar { height: 9px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; overflow: hidden; }
.p-bar i { display: block; height: 100%; background: #7fd36b; transition: width .3s; }
.plot.thirsty .p-bar i { background: #9ab0c4; }
.plot.ready .p-bar i { background: #ffd43b; }
.p-foot { display: flex; justify-content: space-between; font-size: 14px; min-height: 18px; }
.p-time { font-family: "Permanent Marker", cursive; font-variant-numeric: tabular-nums; }
.plot.ready .p-time { color: #b07a00; }
.plot.thirsty .p-time, .plot.thirsty .p-water { color: #2e6fb5; }
.p-acts { display: flex; gap: 6px; }
.p-main { flex: 1; font-size: 15px; padding: 3px 6px; }
.plot.ready .p-main { background: var(--yellow); }
.plot.thirsty .p-main { background: var(--blue); }
.plot.empty .p-main { background: #c9f2c7; }
.p-x { font-size: 13px; padding: 3px 8px; }
.plot.empty .p-x { display: none; }
.seed-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.seed-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: rgba(255,255,255,.6); border: 2px solid var(--ink); border-radius: var(--sketch); text-align: left; }
.seed-list canvas { width: 54px; height: 54px; flex: none; }
.seed-list li div { flex: 1; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.seed-list b { font-family: "Permanent Marker", cursive; font-weight: normal; font-size: 16px; }
.seed-list small { font-size: 13px; color: #555; }
.seed-list small em { font-style: normal; color: #2f8a3a; font-weight: bold; }
.seed-list .mint-btn { flex: none; padding: 4px 8px; font-size: 15px; }
.g-expand, .g-faucet { display: block; width: 100%; margin-bottom: 8px; font-size: 16px; }
.g-faucet { background: #ffd0e2; border-style: dashed; }
.g-help { font-size: 14px; color: #555; }
.seed-card { width: min(420px, 94vw); }
.seed-card .seed-list { display: flex; max-height: 60vh; overflow-y: auto; }
@media (max-width: 900px) {
  .g-plots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .garden-bar h2 { font-size: 20px; }
  .garden-bar button { font-size: 14px; padding: 3px 8px; }
}
body.in-garden #balance { display: none; }
.g-coins { display: inline-flex; align-items: center; gap: 5px; font-family: "Permanent Marker", cursive; font-size: 15px; padding: 2px 10px; background: #c9f2c7; border: 2px solid var(--ink); border-radius: var(--sketch); box-shadow: 2px 2px 0 var(--ink); }
.g-coins b { font-weight: normal; font-size: 18px; }
.pvd-leaf { display: inline-block; width: 12px; height: 12px; background: #7fd36b; border: 2px solid var(--ink); border-radius: 0 70% 0 70%; flex: none; }
.fuse-btn { display: flex; align-items: baseline; justify-content: center; gap: 8px; width: 100%; margin: 0 0 8px; padding: 4px 10px; font-family: "Permanent Marker", cursive; font-size: 17px; background: #e7d4ff; transform: rotate(-.6deg); }
.fuse-btn small { font-family: "Patrick Hand", cursive; font-size: 14px; }
.fuse-card { width: min(520px, 94vw); }
.fuse-how { font-size: 16px !important; line-height: 1.25; margin-bottom: 12px !important; }
.card ul.fuse-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.fuse-list li { display: grid; grid-template-columns: 1fr auto 1fr 64px auto; align-items: center; gap: 6px; padding: 6px 8px; background: #fff; border: 2px solid var(--ink); border-radius: var(--sketch); opacity: .75; }
.fuse-list li.ready { opacity: 1; background: #fff8c9; box-shadow: 2px 3px 0 var(--ink); }
.fz-from, .fz-to { font-family: "Permanent Marker", cursive; font-size: 14px; color: var(--c); text-shadow: 1px 1px 0 rgba(38,38,58,.25); white-space: nowrap; }
.fz-arrow { font-size: 14px; white-space: nowrap; }
.fz-have { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.fz-have i { display: block; width: 100%; height: 8px; border: 2px solid var(--ink); border-radius: 5px; overflow: hidden; background: #fff; }
.fz-have b { display: block; height: 100%; background: #9b4dde; }
.fz-have small { font-size: 13px; }
.fuse-list .mint-btn { padding: 3px 8px; font-size: 14px; }
@media (max-width: 500px) {
  .fuse-list li { grid-template-columns: 1fr auto 1fr; }
  .fz-have { grid-column: 1 / 3; }
}
.game-card.locked.soon.counting { opacity: 1; }
.game-card.locked.soon.counting canvas { opacity: .75; }
.game-card.locked.soon.counting .tag { display: none; } 
.pvd-count { display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 3px 10px 4px; background: var(--yellow); border: 2px solid var(--ink); border-radius: var(--sketch); box-shadow: 2px 2px 0 var(--ink); transform: rotate(1.5deg); font-family: "Permanent Marker", cursive; font-size: 19px; color: var(--red); font-variant-numeric: tabular-nums; }
.pvd-count small { font-family: "Patrick Hand", cursive; font-size: 12px; color: var(--ink); }
.pvd-count.live { background: #7be38a; color: var(--ink); }
@media (max-width: 900px) { .pvd-count { font-size: 14px; padding: 2px 6px 3px; } .pvd-count small { font-size: 10px; } }
