/* Go, Tinkit, Go! styles. Prefix every class with tinkit- */
.tinkit-stage { background: linear-gradient(180deg, rgba(222, 246, 255, .7), rgba(214, 245, 200, .7)); }
.tinkit-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.tinkit-left { flex: 1 1 0; min-height: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.tinkit-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
@media (min-aspect-ratio: 11/10) {
  .tinkit-wrap { flex-direction: row; gap: 16px; padding: 14px; }
  .tinkit-side { flex: 0 0 44%; justify-content: center; gap: 14px; }
}

/* garden bed: one flower blooms for each job done */
.tinkit-bed { display: flex; gap: 6px; padding: 2px 12px; border-radius: 999px; background: #8A5A2B; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .18); }
.tinkit-bed span { font-size: 20px; line-height: 1.3; opacity: .55; transform: scale(.8); transition: transform .4s, opacity .4s; }
.tinkit-bed span.tinkit-grown { opacity: 1; transform: scale(1.2); }

/* the garden grid */
.tinkit-board { position: relative; display: grid; border-radius: 18px; overflow: hidden; border: 4px solid #5FA83A; box-shadow: 0 8px 18px rgba(29, 43, 83, .18); background: #9BDB6B; flex-shrink: 0; }
.tinkit-cell { position: relative; display: grid; place-items: center; background: #A8E27A; box-shadow: inset 0 0 0 1px rgba(60, 130, 40, .25); min-width: 0; min-height: 0; }
.tinkit-cell.tinkit-alt { background: #9AD96C; }
.tinkit-thing { font-size: 1.15em; line-height: 1; }
.tinkit-item { width: 62%; height: 62%; display: block; }
.tinkit-item svg { width: 100%; height: 100%; display: block; }
.tinkit-thirsty { animation: tinkit-sway 1.6s ease-in-out infinite; }
.tinkit-bloom { animation: tinkit-pop .5s ease-out; }
.tinkit-deco { position: absolute; font-size: .34em; line-height: 1; opacity: .9; pointer-events: none; }
.tinkit-soil { width: 70%; height: 44%; border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #A8713A, #6E4420); box-shadow: 0 0 0 .08em #FFE45C, 0 0 .3em .1em rgba(255, 228, 92, .8); animation: tinkit-glow 1.4s ease-in-out infinite; }
.tinkit-rock { width: 76%; height: 62%; border-radius: 48% 52% 40% 44% / 60% 62% 38% 40%; background: linear-gradient(160deg, #C4CAD6, #8A93A6); box-shadow: inset -.1em -.12em 0 rgba(0, 0, 0, .16), 0 .06em 0 rgba(0, 0, 0, .15); }
.tinkit-puddle { position: relative; width: 84%; height: 60%; border-radius: 50% 46% 52% 48% / 56% 50% 50% 44%; background: radial-gradient(ellipse at 40% 35%, #BDE9FF, #4DB8FF 70%); box-shadow: inset 0 -.06em 0 rgba(0, 60, 140, .25); display: grid; place-items: center; }
.tinkit-puddle b { position: absolute; top: -62%; font-size: .9em; font-weight: 400; line-height: 1; }
.tinkit-maybe { background: none; box-shadow: none; border: .06em dashed #2580BD; }
.tinkit-maybe::after { content: '?'; font-size: .6em; font-weight: 700; color: #2580BD; }
.tinkit-maybe.tinkit-rain { background: radial-gradient(ellipse at 40% 35%, #BDE9FF, #4DB8FF 70%); border-style: solid; }
.tinkit-maybe.tinkit-rain::after { content: '💧'; }
.tinkit-maybe.tinkit-dry { opacity: .35; }
.tinkit-maybe.tinkit-dry::after { content: ''; }
.tinkit-drop { position: absolute; font-size: .6em; pointer-events: none; animation: tinkit-drop .9s ease-out forwards; z-index: 4; }
.tinkit-picking .tinkit-cell { cursor: pointer; }
.tinkit-picking .tinkit-cell:empty::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: tinkit-glow 1.2s ease-in-out infinite; }

/* Tinkit */
.tinkit-bot { position: absolute; left: 0; top: 0; z-index: 3; transition: left .42s ease-in-out, top .42s ease-in-out; pointer-events: none; }
.tinkit-botin { position: absolute; inset: 4%; display: grid; place-items: center; }
.tinkit-botin .cast { width: 100%; height: 100%; filter: drop-shadow(0 .05em .04em rgba(0, 0, 0, .25)); }
.tinkit-carry { position: absolute; right: -4%; bottom: 2%; width: 42%; height: 42%; }
.tinkit-carry svg { width: 100%; height: 100%; display: block; }
.tinkit-huh { position: absolute; top: -18%; right: -8%; font-size: .55em; display: none; }
.tinkit-puzzled .tinkit-huh { display: block; animation: tinkit-pop .4s ease-out; }
.tinkit-nose { position: absolute; inset: 0; display: none; transition: transform .3s; }
.tinkit-turny .tinkit-nose { display: block; }
.tinkit-nose::before { content: ''; position: absolute; left: 50%; top: -7%; margin-left: -.3em; border: .3em solid transparent; border-top: 0; border-bottom: .36em solid #E8590C; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff); }
.tinkit-hop { animation: tinkit-hop .5s ease-out; }
.tinkit-bump { animation: tinkit-bump .6s ease-out; }
.tinkit-slip { animation: tinkit-slip .9s ease-in-out; }
.tinkit-shrug { animation: tinkit-shrug .8s ease-in-out; }
.tinkit-cheer { animation: tinkit-hop .45s ease-out 2; }

/* talk bubble */
.tinkit-talk { display: flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; }
.tinkit-face { width: 36px; height: 40px; flex-shrink: 0; }
.tinkit-face .cast { width: 100%; height: 100%; }
.tinkit-say { background: #FFF8D6; border-radius: 14px; padding: 6px 12px; font-size: clamp(14px, 1.6vw, 18px); font-weight: 600; line-height: 1.25; color: #1D2B53; box-shadow: 0 3px 8px rgba(29, 43, 83, .12); }
.tinkit-say:empty { display: none; }

/* cards */
.tinkit-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 2px 0 rgba(29, 43, 83, .08); max-width: 100%; }
.tinkit-slot { width: 64px; height: 68px; border-radius: 14px; border: 3px dashed #B9C3DA; background: rgba(255, 255, 255, .5); }
.tinkit-pal { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 100%; }
.tinkit-card { position: relative; width: 64px; height: 68px; padding: 0; border: 0; border-radius: 14px; background: #3D8BFD; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; font: inherit; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), 0 4px 8px rgba(29, 43, 83, .18); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tinkit-card:active { transform: translateY(3px); }
.tinkit-pal .tinkit-card { width: 72px; height: 76px; }
.tinkit-g { width: 40px; height: 40px; display: grid; place-items: center; }
.tinkit-g svg { width: 100%; height: 100%; display: block; }
.tinkit-e { font-size: 30px; line-height: 1; }
.tinkit-w { font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .2px; text-align: center; }
.tinkit-n { position: absolute; top: -7px; right: -7px; min-width: 28px; padding: 2px 4px; border-radius: 999px; background: #FFE45C; color: #1D2B53; font-size: 15px; font-weight: 700; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.tinkit-words .tinkit-card, .tinkit-words .tinkit-slot { width: 76px; height: 78px; }
.tinkit-words .tinkit-pal .tinkit-card { width: 80px; height: 82px; }
.tinkit-words .tinkit-g { width: 36px; height: 36px; }
.tinkit-c-fwd { background: #2FA84F; }
.tinkit-c-tl, .tinkit-c-tr { background: #8A5CF6; }
.tinkit-c-if { background: #0E8FB8; }
.tinkit-c-grab { background: #E8590C; }
.tinkit-c-water { background: #1287A8; }
.tinkit-c-again { background: #D6336C; }
.tinkit-c-trick { background: #C98A00; }
.tinkit-drive .tinkit-pal .tinkit-card { width: 88px; height: 88px; border-radius: 20px; }
.tinkit-drive .tinkit-g { width: 54px; height: 54px; }
.tinkit-card.tinkit-run { outline: 5px solid #FFE45C; box-shadow: 0 0 18px 6px rgba(255, 228, 92, .9); transform: scale(1.1); z-index: 2; }
.tinkit-card.tinkit-bad { outline: 4px dashed #E8590C; }
.tinkit-hint { animation: tinkit-wiggle .7s ease-in-out infinite; outline: 4px solid #FFE45C; }
.tinkit-running .tinkit-pal, .tinkit-running .tinkit-go, .tinkit-picking .tinkit-pal, .tinkit-picking .tinkit-go, .tinkit-picking .tinkit-strip { opacity: .45; }
.tinkit-trickbox { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 14px; background: #FFF3C4; border: 3px solid #C98A00; }
.tinkit-trickbox b { font-size: 20px; color: #7A5600; margin: 0 2px; }
.tinkit-mini { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.tinkit-mini svg { width: 72%; height: 72%; }
.tinkit-mini.tinkit-run { outline: 3px solid #E8590C; transform: scale(1.15); }
.tinkit-go { min-width: 150px; height: 70px; padding: 0 28px; border: 0; border-radius: 22px; background: #9DB8A4; color: #fff; font: inherit; font-size: 28px; font-weight: 700; cursor: pointer; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 6px 12px rgba(29, 43, 83, .2); text-shadow: 0 2px 0 rgba(0, 0, 0, .18); touch-action: manipulation; flex: none; min-height: 48px; }
.tinkit-go.tinkit-ready { background: #1FA83C; }
.tinkit-go:active { transform: translateY(4px); }

@media (max-width: 600px) {
  .tinkit-wrap { padding: 6px; gap: 5px; }
  .tinkit-side { gap: 5px; }
  .tinkit-strip { padding: 5px; gap: 4px; }
  .tinkit-pal { gap: 5px; }
  .tinkit-pal .tinkit-card, .tinkit-words .tinkit-pal .tinkit-card, .tinkit-words .tinkit-card, .tinkit-words .tinkit-slot { width: 66px; height: 68px; }
  .tinkit-words .tinkit-g { width: 30px; height: 30px; }
  .tinkit-w { font-size: 11px; }
  .tinkit-go { height: 64px; font-size: 24px; }
  .tinkit-talk { min-height: 36px; }
  .tinkit-say { font-size: 13px; padding: 4px 9px; }
  .tinkit-face { width: 28px; height: 32px; }
  .tinkit-bed span { font-size: 15px; }
  .tinkit-drive .tinkit-pal .tinkit-card { width: 76px; height: 76px; }
}

/* phones held sideways and other short screens: smaller cards (still at least 44px to tap) so the plan, cards and Go all fit */
@media (max-height: 500px) {
  .tinkit-wrap { padding: 4px; gap: 6px; }
  .tinkit-side { gap: 4px; overflow-y: auto; }
  .tinkit-strip { padding: 4px; gap: 4px; border-radius: 14px; }
  .tinkit-pal { gap: 5px; }
  .tinkit-slot, .tinkit-card, .tinkit-words .tinkit-card, .tinkit-words .tinkit-slot { width: 46px; height: 46px; border-radius: 11px; }
  .tinkit-pal .tinkit-card, .tinkit-words .tinkit-pal .tinkit-card { width: 54px; height: 52px; }
  .tinkit-drive .tinkit-pal .tinkit-card { width: 64px; height: 60px; }
  .tinkit-g, .tinkit-words .tinkit-g { width: 26px; height: 26px; }
  .tinkit-drive .tinkit-g { width: 38px; height: 38px; }
  .tinkit-e { font-size: 22px; }
  .tinkit-w { font-size: 9px; }
  .tinkit-n { font-size: 12px; min-width: 22px; top: -5px; right: -5px; }
  .tinkit-go { height: 50px; min-width: 120px; font-size: 22px; border-radius: 16px; }
  .tinkit-talk { min-height: 30px; }
  .tinkit-say { font-size: 13px; padding: 3px 8px; }
}

@keyframes tinkit-pop { 0% { transform: scale(.2); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes tinkit-sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes tinkit-glow { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .75; transform: scale(.92); } }
@keyframes tinkit-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-38%) scale(1.06, .96); } }
@keyframes tinkit-bump { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(calc(var(--bx, 0) * 22%), calc(var(--by, 0) * 22%)) scale(.94); } 55% { transform: translate(calc(var(--bx, 0) * -8%), calc(var(--by, 0) * -8%)); } 75% { transform: translate(calc(var(--bx, 0) * 5%), calc(var(--by, 0) * 5%)); } }
@keyframes tinkit-slip { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(calc(var(--bx, 0) * 30%), calc(var(--by, 0) * 30%)) rotate(-16deg); } 50% { transform: translate(calc(var(--bx, 0) * 30%), calc(var(--by, 0) * 30%)) rotate(16deg); } 75% { transform: translate(calc(var(--bx, 0) * 12%), calc(var(--by, 0) * 12%)) rotate(-8deg); } }
@keyframes tinkit-shrug { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 60% { transform: rotate(9deg); } }
@keyframes tinkit-drop { 0% { transform: translateY(-40%) scale(.5); opacity: 0; } 30% { opacity: 1; transform: translateY(0) scale(1.2); } 100% { transform: translateY(30%) scale(.8); opacity: 0; } }
@keyframes tinkit-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) scale(1.06); } 75% { transform: rotate(7deg) scale(1.06); } }
