.tg{--tg-ink:#29493e;--tg-soft:#66766c;--tg-line:#dcdace;--tg-gold:#dca951;color:var(--tg-ink);font-family:inherit;font-size:14px;line-height:1.55;isolation:isolate}
.tg *,.tg *::before,.tg *::after{box-sizing:border-box}
.tg [hidden]{display:none!important}
.tg p{margin:0}.tg .tg-instruction{color:var(--tg-soft);font-size:14px;line-height:1.65;margin:2px 0 12px}
.tg .tg-scoreline{display:flex;justify-content:space-between;align-items:center;padding:7px 0 12px;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.tg .tg-balance{border-radius:20px;background:#f3ead5;color:#755e2e;padding:2px 10px}
.tg .tg-feedback{min-height:1.6em;margin:9px 0 5px;font-size:13px;font-weight:650;line-height:1.55}
.tg .tg-rules,.tg .tg-coupon-note{margin:13px 0 2px;padding-top:10px;border-top:1px solid var(--tg-line);color:var(--tg-soft);font-size:12px;line-height:1.65}
.tg button,.tg select{font:inherit;cursor:pointer;color:var(--tg-ink);line-height:1.3}
.tg button:focus-visible,.tg select:focus-visible{outline:3px solid #c17b32;outline-offset:2px}
.tg button:disabled{cursor:default}.tg .tg-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.tg .tg-card{display:grid;place-items:stretch;position:relative;min-width:0;min-height:51px;aspect-ratio:0.83;border:1px solid #416258;background:#36594e;color:#eee9cd;padding:4px;border-radius:8px;box-shadow:0 2px 0 #173c32;transition:background .18s,transform .18s}
.tg .tg-card:enabled:hover{transform:translateY(-2px)}.tg .tg-back{border:1px solid #acc0a366;border-radius:4px;background-image:repeating-linear-gradient(48deg,transparent 0px,transparent 6px,#bfd1ac22 6.5px,#bfd1ac22 7.5px);display:grid;place-items:center}
.tg .tg-back::after{content:"";height:19px;width:19px;transform:rotate(45deg);background:#d4c79b;border:5px solid #36594e;outline:1px solid #d4c79b;box-shadow:0 0 0 4px #36594e}
.tg .tg-card-inner{display:none;align-content:center;justify-items:center;gap:3px}
.tg .tg-card.tg-face{background:#fffaf1;border-color:#b4b7a6;color:var(--tg-ink);box-shadow:0 2px 0 #b3baaa}
.tg .tg-card.tg-face .tg-back{display:none}.tg .tg-card.tg-face .tg-card-inner{display:grid}
.tg .tg-card.tg-matched{background:#e4ecd9;border-color:#a5b494;box-shadow:none}
.tg .tg-product-name{font-size:11px;font-weight:750;white-space:nowrap;line-height:1.2}
.tg .tg-art{position:relative;display:block;width:35px;height:30px;color:var(--tg-art-color)}
.tg .tg-art i,.tg .tg-art::before,.tg .tg-art::after{position:absolute;display:block}
.tg .tg-art-rings i{width:22px;height:12px;border:3px solid currentColor;border-radius:50%;transform:rotate(-23deg)}.tg .tg-art-rings i:nth-child(1){top:4px;left:0}.tg .tg-art-rings i:nth-child(2){top:13px;right:0;color:#ad7e52}.tg .tg-art-rings i:nth-child(3){display:none}
.tg .tg-main,.tg .tg-secondary,.tg .tg-step{border:1px solid transparent;border-radius:8px;font-weight:700;padding:10px 12px;min-height:42px}
.tg .tg-main{width:100%;background:#315849;color:#fff9e9;transition:background .15s}.tg .tg-main:enabled:hover{background:#234637}
.tg .tg-main:disabled{background:#e5e7dc;color:#647567}
.tg .tg-secondary{display:block;margin:4px auto 0;background:transparent;color:#536e61;font-size:12px;min-height:34px;text-decoration:underline;text-underline-offset:3px}
.tg .tg-secondary:disabled{visibility:hidden}
.tg .tg-ring-stage{position:relative;border-radius:10px;border:1px solid #bfa884;overflow:hidden;height:137px;background:linear-gradient(#84a79b,#bad0b3 45%,#c59972 46%,#dfb68f 100%)}
.tg .tg-table-back{position:absolute;inset:0 0 50%;background:repeating-linear-gradient(90deg,transparent 0 22px,#c1d6b5 23px 25px,transparent 26px 48px),linear-gradient(144deg,#6f9484,#acc6a9)}
.tg .tg-table-back::after{content:"";position:absolute;left:0;right:0;bottom:4px;height:6px;background:#d9bc89;border-top:1px solid #b39d74}
.tg .tg-table{position:absolute;left:5%;right:5%;bottom:16%;height:55%;border:1px solid #b18d63;border-radius:8px;box-shadow:0 5px 0 #b88e63,0 11px 9px #82644245;background:repeating-linear-gradient(0deg,transparent 0px,transparent 15px,#b08c635c 16px,#edd2a6 17px),linear-gradient(160deg,#ecd1a2,#e2bb8c)}
.tg .tg-peg{position:absolute;height:46px;width:30px;top:17%;transform:translateX(-50%);display:grid;justify-items:center}
.tg .tg-peg::before{content:"";position:absolute;width:29px;height:9px;left:4px;bottom:6px;background:#99774c65;border-radius:50%;transform:rotate(8deg)}
.tg .tg-peg-body{position:absolute;width:9px;height:29px;bottom:10px;border:1px solid #aa8264;border-radius:5px 5px 3px 3px;background:linear-gradient(90deg,#ead2a4,#d1ac80 80%);box-shadow:inset 0 3px #6d9288}
.tg .tg-peg-no{position:absolute;bottom:-9px;color:#735b3d;font-size:11px;font-weight:800}
.tg .tg-peg.tg-target::after{content:"";position:absolute;bottom:6px;width:29px;height:13px;border:2px solid #e8a73c;border-radius:50%;box-shadow:0 0 7px #ebbb68}
.tg .tg-target .tg-peg-body{box-shadow:inset 0 6px #ce8738;background:linear-gradient(90deg,#ffd578,#efb85e)}
.tg .tg-thrown-ring{position:absolute;z-index:1;left:calc(50% - 18px);bottom:13%;width:36px;height:18px;border:4px solid #cf7453;border-radius:50%;box-shadow:0 1px 0 #8c503e,inset 0 1px 0 #8c503e;pointer-events:none}
.tg .tg-meter{position:relative;height:13px;margin:19px 5px 15px;background:#d9dfd2;border-radius:8px;box-shadow:inset 0 1px 2px #788a7240}
.tg .tg-zone{position:absolute;inset-block:0;background:repeating-linear-gradient(-45deg,#c89745 0px,#c89745 3px,#e3b460 4px,#e3b460 6px);border-radius:3px}
.tg .tg-needle{position:absolute;top:-5px;height:23px;width:4px;transform:translateX(-50%);border-radius:8px;background:#2f4e42;box-shadow:0 0 0 1px #fff9}
.tg .tg-sr{position:absolute;width:1px;height:1px;clip-path:inset(100%);overflow:hidden;white-space:nowrap}
.tg .tg-step-buttons{display:flex;gap:8px;margin-bottom:7px}.tg .tg-step{flex:1;background:#f0eee3;border-color:#d8d9cc;min-height:34px;padding:5px 10px;font-size:13px}
.tg .tg-credit{display:flex;align-items:center;justify-content:space-between;border:1px solid #cbd4be;background:#e9efdf;border-radius:9px;padding:12px 15px;margin-bottom:14px;font-size:14px;font-weight:650}
.tg .tg-credit strong{font-size:22px;font-variant-numeric:tabular-nums}
.tg .tg-select-label{display:block;font-size:13px;font-weight:700;margin:7px 0 9px}
.tg .tg-select{display:block;width:100%;margin-top:5px;padding:9px 10px;border-radius:7px;border:1px solid #babdaf;background:#fffdf6}
.tg .tg-ticket-title{margin:12px 0 7px;font-size:15px;color:var(--tg-ink);font-weight:750}
.tg .tg-tickets{display:grid;gap:6px}.tg .tg-empty{font-size:13px;color:var(--tg-soft)}
.tg .tg-ticket{display:grid;gap:1px;border:1px dashed #b5a17c;border-left:4px solid #b8894f;background:#f4ead4;border-radius:5px;padding:8px 12px;color:#604f37}
.tg .tg-ticket small{font:11px ui-monospace,monospace;letter-spacing:.08em}
@media(prefers-reduced-motion:reduce){.tg .tg-card{transition:none}.tg .tg-card:enabled:hover{transform:none}}

/* Compact marketplace and inventory panels. */
.tg .tg-brand-name{display:none}
.tg .tg-item-card{display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;gap:15px;margin:10px 0 13px;padding:12px;border:1px solid #e0d6bf;border-radius:13px;background:linear-gradient(122deg,#f7ebcf,#fbf5e7 70%)}
.tg .tg-item-art{height:72px;width:72px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 25%,#fff5cd,#e7c28a);border:1px solid #dac09a;box-shadow:inset 0 0 0 4px #fff4d585}
.tg .tg-item-description,.tg .tg-holding-info{display:grid;min-width:0;gap:2px}
.tg .tg-item-description strong{font-size:17px;color:#4c482f;line-height:1.38}
.tg .tg-item-kind,.tg .tg-holding-info small{font-size:12px;color:var(--tg-soft)}
.tg .tg-item-price{font-size:14px;font-weight:750;color:#89642c}
.tg .tg-stall-balance{margin:0 0 8px;color:var(--tg-soft);font-size:14px;font-variant-numeric:tabular-nums}
.tg .tg-play-nearby,.tg .tg-equip{min-height:42px;border:1px solid #b8c3ac;background:#f0f3e7;border-radius:8px;color:#365643;font-weight:700;padding:8px 11px}
.tg .tg-play-nearby{margin-top:7px;width:100%}
.tg .tg-main,.tg .tg-equip,.tg .tg-play-nearby{touch-action:manipulation}
.tg .tg-equip:disabled{opacity:.7}
.tg .tg-inventory{margin-top:14px;padding-top:4px;border-top:1px solid var(--tg-line)}
.tg .tg-holding{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#eef0e6;border:1px solid #d6dbce;border-radius:9px;padding:10px}
.tg .tg-holding-info strong{font-size:14px}.tg .tg-holding-info small{font-variant-numeric:tabular-nums}.tg .tg-equip{font-size:12px;flex-shrink:0}
.tg .tg-empty{line-height:1.65}

/* The activity host is a centered modal. The same controls remain usable in narrow drawers. */
#activity .tg-memory,#activity .tg-rings{width:100%;max-width:900px;margin-inline:auto;container:town-game / inline-size}
#activity .tg .tg-instruction{font-size:clamp(14px,2.1cqi,17px);line-height:1.5;margin:4px 0 9px}
#activity .tg .tg-scoreline{padding:8px 0 12px;font-size:clamp(14px,2.3cqi,18px)}
#activity .tg .tg-balance{padding:4px 13px}
#activity .tg .tg-cards{gap:clamp(6px,1.5cqi,13px);padding:clamp(7px,2.4cqi,20px);border:1px solid #abb9a0;border-radius:16px;background:linear-gradient(135deg,#d6dfc9,#b9c9aa);box-shadow:inset 0 1px 3px #899b7e38}
#activity .tg .tg-card{aspect-ratio:auto;height:clamp(72px,22cqi,156px);min-height:0;border-radius:clamp(6px,1.2cqi,12px);padding:clamp(4px,1.2cqi,10px);box-shadow:0 3px 0 #224637}
#activity .tg .tg-card.tg-face{box-shadow:0 3px 0 #9faf94}
#activity .tg .tg-card.tg-matched{box-shadow:none}
#activity .tg .tg-back{background-color:#345749;background-image:repeating-linear-gradient(47deg,transparent 0,transparent 7px,#c6d4ac26 8px,transparent 9px),repeating-linear-gradient(-47deg,transparent 0,transparent 7px,#c6d4ac19 8px,transparent 9px)}
#activity .tg .tg-back::after{width:clamp(19px,5cqi,37px);height:clamp(19px,5cqi,37px);border-width:clamp(5px,1.6cqi,12px)}
#activity .tg .tg-card-inner{gap:6px}
#activity .tg .tg-product-name{font-size:clamp(12px,2.6cqi,20px)}
#activity .tg .tg-feedback{margin:13px 0 4px;font-size:clamp(14px,2.1cqi,17px)}
#activity .tg .tg-main{min-height:48px;font-size:clamp(15px,2.3cqi,18px)}
#activity .tg .tg-ring-stage{height:clamp(173px,46cqi,310px);border-radius:16px;box-shadow:inset 0 0 0 4px #fff5d73a}
#activity .tg .tg-ring-stage::before{content:"";position:absolute;top:0;left:0;right:0;height:13%;background:repeating-linear-gradient(90deg,#bd855a 0 9%,#f0cc9c 9% 18%);box-shadow:0 3px 0 #a47b5788;z-index:1}
#activity .tg .tg-table{border-radius:13px;background:repeating-linear-gradient(0deg,transparent 0px,transparent 19px,#ac855b48 20px,#f9dfb1 21px),linear-gradient(160deg,#efdab5,#ddb386)}
#activity .tg .tg-peg{height:53%;width:15%;top:12%}
#activity .tg .tg-peg-body{width:clamp(11px,2.8cqi,22px);height:75%;bottom:12%;border-radius:9px 9px 5px 5px;box-shadow:inset 0 6px #75988b,2px 0 0 #98704425}
#activity .tg .tg-target .tg-peg-body{box-shadow:inset 0 7px #b97832,2px 0 0 #98704425}
#activity .tg .tg-peg::before{left:36%;bottom:9%;width:56%;height:16%}
#activity .tg .tg-peg.tg-target::after{bottom:6%;width:52%;height:24%;border-width:3px}
#activity .tg .tg-peg-no{font-size:clamp(12px,2.3cqi,17px);line-height:1;bottom:-19%}
#activity .tg .tg-thrown-ring{width:clamp(36px,8cqi,69px);height:clamp(18px,4cqi,34px);left:calc(50% - clamp(18px,4cqi,34.5px));border-width:clamp(4px,1cqi,7px)}
#activity .tg .tg-meter{height:clamp(17px,3.4cqi,24px);margin:clamp(16px,3cqi,24px) 5% 15px}
#activity .tg .tg-needle{height:calc(100% + 10px);width:5px}
#activity .tg .tg-secondary,#activity .tg .tg-step{min-height:44px;font-size:14px}
@container town-game (min-width:430px){
  #activity .tg .tg-card-inner{gap:4px}
  #activity .tg .tg-card-inner .tg-art{scale:1.45;margin:7px auto}
  #activity .tg .tg-brand-name{display:block;font-size:clamp(11px,1.85cqi,15px);font-weight:550;color:#627263}
}
@container town-game (min-width:650px){
  #activity .tg .tg-card-inner .tg-art{scale:1.8;margin:13px auto}
  #activity .tg .tg-main{display:block;max-width:350px;margin:9px auto 0}
  #activity .tg .tg-step-buttons{max-width:350px;margin-inline:auto}
}
@media(max-height:535px){
  #activity .tg .tg-card{height:clamp(70px,15cqi,95px)}
  #activity .tg .tg-card-inner .tg-art{scale:1;margin:0}
  #activity .tg .tg-ring-stage{height:clamp(145px,26cqi,185px)}
}
.tg .tg-item-photo{display:block;width:72px;height:72px;object-fit:contain;background:#fffdf8;border-radius:9px;border:1px solid #ddcfb6}
.tg .tg-holdings{display:grid;gap:7px}
.tg-wallet > .tg-main{margin-top:16px}

/* The same full-width dialog hosts every game in the western district. */
#activity:is([data-kind="fortune"],[data-kind="balloons"],[data-kind="goldfish"],[data-kind="hoops"],[data-kind="pinball"],[data-kind="moles"]){
  width:min(960px,94vw);max-height:min(93dvh,940px);
}
#activity .tg:is(.tg-fortune,.tg-balloons,.tg-goldfish,.tg-hoops,.tg-pinball,.tg-moles){
  width:100%;max-width:900px;margin-inline:auto;container:town-game / inline-size;
}
.tg-field{position:relative;isolation:isolate;border-radius:16px;border:1px solid #adab8c;overflow:hidden}
.tg .tg-game-actions{display:flex;align-items:center;flex-direction:column;gap:7px;margin:12px auto 2px}
.tg .tg-game-actions .tg-main{margin:0}
.tg .tg-game-actions>.tg-main,.tg .tg-game-actions>.tg-slider,.tg .tg-game-actions>.tg-meter,.tg .tg-game-actions>.tg-aim-caption{width:min(100%,620px)}
.tg .tg-game-actions>.tg-main{max-width:350px}
.tg .tg-slider{display:grid;grid-template-columns:auto minmax(60px,1fr) 3ch;align-items:center;gap:12px;color:var(--tg-ink);font-size:14px;font-weight:650}
.tg .tg-slider input{min-width:0;width:100%;height:36px;accent-color:#44755c;cursor:pointer}
.tg .tg-slider b{text-align:right;font-variant-numeric:tabular-nums}
.tg .tg-slow-option{display:inline-flex;align-items:center;gap:6px;min-height:36px;font-size:14px}
.tg .tg-slow-option input{width:18px;height:18px;accent-color:#44755c}
.tg .tg-aim-caption{font-size:14px;text-align:center;font-variant-numeric:tabular-nums}
#activity .tg-game-actions .tg-meter{height:14px;margin:6px 0 10px}
.tg-field button:focus-visible{outline:3px solid #ffeb9c;outline-offset:-3px}
.tg-field:focus-visible{outline:3px solid #916d2d;outline-offset:2px}
.tg .tg-art-coins i{width:17px;height:17px;border:2px solid #9c6a35;outline:1px solid #e3bb76;border-radius:50%;background:radial-gradient(#684d32 22%,#edc16c 25%,#ba894d 75%);top:10px;left:1px}
.tg .tg-art-coins i:nth-child(2){left:17px}.tg .tg-art-coins i:nth-child(3){left:9px;top:0}
.tg .tg-art-fish i:nth-child(1){inset:7px 5px 6px 8px;border-radius:55% 58% 48% 56%;background:currentColor}
.tg .tg-art-fish i:nth-child(2){top:8px;left:0;width:14px;height:14px;background:#dd8a61;clip-path:polygon(0 0,100% 47%,9% 100%)}
.tg .tg-art-fish i:nth-child(3){top:12px;right:8px;width:3px;height:3px;border-radius:50%;background:#3e4537}
.tg .tg-art-balloon i:first-child{width:19px;height:22px;left:8px;top:0;border-radius:50% 50% 46% 46%;background:radial-gradient(ellipse at 30% 27%,#f3c3ba 0 10%,transparent 15%),currentColor}
.tg .tg-art-balloon i:nth-child(2){height:10px;left:17px;top:21px;border-left:1px solid #9d876e;transform:rotate(13deg)}
/* Balloon wall */
.tg .tg-balloon-wall{background:repeating-linear-gradient(90deg,#584d68 0 24px,#514961 24px 46px);border:5px solid #b38b66;box-shadow:inset 0 0 0 2px #d4bc93}
.tg .tg-target-label{display:table;margin:12px auto 2px;padding:5px 22px;color:#433d36;background:#f7dba6;border:1px solid #806846;border-radius:18px;text-align:center;font-weight:750;letter-spacing:.03em}
.tg .tg-balloon-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;padding:8px clamp(8px,6cqi,60px) 16px}
.tg .tg-balloon{--skin:#dd7c73;position:relative;display:grid;place-items:start center;min-width:0;height:clamp(59px,11cqi,86px);padding:1px 0 0;border:0;background:transparent;cursor:crosshair}
.tg .tg-balloon-1{--skin:#e2ae4c}.tg .tg-balloon-2{--skin:#71b5aa}.tg .tg-balloon-3{--skin:#a893c3}
.tg .tg-balloon-skin{display:grid;place-items:center;position:relative;height:82%;aspect-ratio:.80;border-radius:50% 52% 49% 48% / 48% 50% 57% 54%;color:#432f35;font-weight:850;font-size:clamp(14px,3cqi,22px);background:radial-gradient(ellipse at 28% 23%,#ffffffaa 0 7%,transparent 12%),radial-gradient(ellipse at 33% 23%,#ffffff40,transparent 50%,#4b29334a 100%),var(--skin);box-shadow:inset -3px -3px 2px #52354636,2px 3px 4px #211b2b66;transition:transform .15s ease;pointer-events:none}
.tg .tg-balloon-skin::before,.tg .tg-balloon-skin::after{content:"";position:absolute;left:50%;top:98%;transform:translateX(-50%)}
.tg .tg-balloon-skin::before{width:6px;height:4px;background:var(--skin);clip-path:polygon(50% 0,100% 100%,0 100%)}
.tg .tg-balloon-skin::after{margin-top:4px;width:4px;height:11px;border-left:1px solid #e3d6c1;border-radius:50%;transform:rotate(13deg)}
.tg .tg-balloon:enabled:hover .tg-balloon-skin{transform:translateY(-3px) rotate(-3deg)}
.tg .tg-balloon.popped .tg-balloon-skin{visibility:hidden}
.tg .tg-balloon.popped::after{content:"✧";position:absolute;top:15%;left:0;right:0;color:#d5b889;font-size:25px;text-align:center}
@media(prefers-reduced-motion:no-preference){.tg .tg-balloon.popped::after{animation:tg-pop .45s ease-out both}@keyframes tg-pop{from{transform:scale(1.5);opacity:1}to{transform:scale(.8);opacity:.45}}}
/* Paper-net pond */
.tg .tg-pond{height:clamp(225px,39cqi,340px);background:radial-gradient(ellipse at 53% 100%,#81b8a7 0,transparent 56%),radial-gradient(ellipse at 16% 10%,#c0d8b3,transparent 42%),linear-gradient(155deg,#91bbae,#63a49c 56%,#538c86);border:7px solid #aa825c;box-shadow:inset 0 0 0 2px #ccd1a7,inset 0 6px 18px #34635f60;cursor:crosshair;touch-action:manipulation}
.tg-water-lines{position:absolute;inset:0;opacity:.45;background:repeating-radial-gradient(ellipse at 30% -40%,transparent 0 26px,#def4d66b 27px 28px,transparent 30px 55px);pointer-events:none}
.tg-lily{position:absolute;right:3%;top:5%;width:10%;aspect-ratio:1.45;background:#648d5b;clip-path:polygon(50% 48%,17% 80%,4% 57%,7% 36%,23% 13%,48% 5%,76% 14%,96% 39%,94% 62%,76% 84%,45% 98%,27% 93%);transform:rotate(-16deg)}
.tg-goldfish{position:absolute;width:clamp(35px,7.5cqi,65px);height:clamp(23px,4.5cqi,42px);transform:translate(-50%,-50%) scaleX(var(--facing,1));pointer-events:none;filter:drop-shadow(0 3px 2px #355c562e)}
.tg-goldfish .fish-body{position:absolute;left:21%;top:20%;width:75%;height:58%;border-radius:60% 62% 52% 54%;background:radial-gradient(circle at 80% 33%,#342e25 0 5%,#f5de9d 5.5% 8%,transparent 9%),linear-gradient(159deg,#f4bc78,#eb8752 47%,#be593b)}
.tg-goldfish .fish-body::before{content:"";position:absolute;top:-28%;left:26%;width:41%;height:38%;border-radius:90% 37% 0 0;background:#db7d4e;transform:rotate(15deg)}
.tg-goldfish .fish-tail{position:absolute;left:0;top:1%;width:44%;height:91%;background:#ec9864;clip-path:polygon(0 0,61% 24%,100% 52%,52% 80%,8% 100%,21% 56%);border-radius:50%}
.tg-goldfish.fish-2 .fish-body,.tg-goldfish.fish-4 .fish-body{background:radial-gradient(circle at 80% 33%,#342e25 0 5%,#f5de9d 5.5% 8%,transparent 9%),radial-gradient(ellipse at 36% 12%,#f6dfac 0 23%,transparent 24%),#df7d48}
.tg-scoop-net{position:absolute;width:20%;height:25%;display:block;transform:translate(-50%,-50%);border:3px solid #fff0bc;border-radius:50%;background:repeating-linear-gradient(48deg,transparent 0 6px,#fff4c540 6px 7px),#f7e9ce27;box-shadow:0 0 0 1px #846e43,0 3px 4px #45655d33;pointer-events:none}
.tg-scoop-net::after{content:"";position:absolute;left:81%;top:83%;width:57%;height:7px;transform:rotate(40deg);transform-origin:0 0;background:#d6ac71;border:1px solid #8d6d40;border-radius:4px}
.tg-scoop-net::before{content:"";position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);height:5px;width:5px;background:#fff3cf;outline:1px solid #57766a;border-radius:50%}
.tg-scoop-net.lifted{box-shadow:0 0 0 5px #fff2bd8f,0 4px 12px #315c5499}
/* Basketball machine */
.tg .tg-court{height:clamp(190px,34cqi,300px);background:repeating-linear-gradient(48deg,transparent 0 14px,#8aaba640 15px 16px,transparent 17px 27px),repeating-linear-gradient(-48deg,transparent 0 14px,#8aaba640 15px 16px,transparent 17px 27px),linear-gradient(#394c53,#607c76 69%,#bc9469 70%);border:5px solid #856e54;cursor:crosshair}
.tg-court-floor{position:absolute;inset:68% -11% -30%;background:repeating-linear-gradient(90deg,transparent 0 34px,#b181512e 35px 38px),#c19e70;transform:perspective(145px) rotateX(32deg);border-top:4px solid #e4c592}
.tg-court-floor::after{content:"";position:absolute;left:22%;right:22%;top:2%;height:68%;border:2px solid #f2d7a4;border-top:0;border-radius:0 0 48% 48%}
.tg-backboard{position:absolute;width:clamp(59px,15cqi,118px);height:29%;transform:translate(-50%,-50%);border:4px solid #d2a982;border-radius:10px 10px 5px 5px;background:#c6d9cae0;box-shadow:0 3px 0 1px #4e675b}
.tg-backboard::before{content:"";position:absolute;width:41%;height:45%;left:28%;bottom:7%;border:2px solid #b2684e}
.tg-basket-rim{position:absolute;left:19%;right:19%;bottom:-9%;height:18%;border:3px solid #b65f36;border-radius:50%;background:#764529;box-shadow:inset 0 2px #ed9854}
.tg-basket-rim::after{content:"";position:absolute;top:50%;left:0;right:0;height:clamp(13px,3.6cqi,26px);background:repeating-linear-gradient(55deg,transparent 0 5px,#f4e9d3 6px 7px),repeating-linear-gradient(-55deg,transparent 0 5px,#f4e9d3 6px 7px);clip-path:polygon(0 0,100% 0,73% 100%,29% 100%)}
.tg-hoop-cross{position:absolute;width:34px;height:34px;transform:translate(-50%,-50%);border:2px dashed #ffe5a0;border-radius:50%;box-shadow:0 0 0 1px #594d48;pointer-events:none}
.tg-hoop-cross::after,.tg-hoop-cross::before{content:"";position:absolute;inset:50% 27% auto;height:2px;background:#ffe6ae}
.tg-hoop-cross::after{transform:rotate(90deg)}
.tg-basketball{position:absolute;width:clamp(26px,5cqi,46px);aspect-ratio:1;transform:translate(-50%,-50%) rotate(var(--spin,0deg));border-radius:50%;border:1px solid #724931;background:linear-gradient(86deg,transparent 47%,#754b30 48% 50%,transparent 51%),linear-gradient(-12deg,transparent 47%,#754b30 48% 51%,transparent 52%),radial-gradient(circle at 33% 26%,#ffc37b,#d98248 62%,#ad5836);box-shadow:0 3px 5px #654b393f;pointer-events:none;overflow:hidden}
.tg-basketball::before,.tg-basketball::after{content:"";position:absolute;inset:-8% 54% -4% -70%;border:2px solid #845336;border-radius:50%}
.tg-basketball::after{inset:-8% -70% -4% 54%}
/* Inclined traditional marble table */
.tg .tg-pinball-field{height:clamp(250px,45cqi,348px);background:repeating-linear-gradient(95deg,#a78461 0 23px,#a5815c 24px 28px,#ad8c69 32px 60px);padding:7px}
.tg-pinboard{height:100%;position:relative;border-radius:44px 44px 9px 9px;border:3px solid #b18a5e;box-shadow:inset 0 0 0 3px #d7b980,inset 0 4px 12px #7b724366;overflow:hidden;background:radial-gradient(ellipse at 42% 65%,#f9dca1,#e4c78c 66%,#c6af75)}
.tg-pinboard::before{content:"";position:absolute;inset:8% 12% 18% 4%;border:1px solid #a88154;border-radius:50% 50% 4% 4%;opacity:.7}
.tg-pinrail{position:absolute;top:16%;bottom:2%;right:0;width:12%;border-left:3px solid #9a835c;background:repeating-linear-gradient(0deg,transparent 0 15px,#e7d8b61a 16px 17px),linear-gradient(90deg,#adabd0 0%,#718889 4%,#c2b88a 12%,#c2b88a 88%,#7f8c82 98%);border-radius:30% 0 0 0}
.tg-spring{position:absolute;left:18%;bottom:0;right:20%;height:10%;background:repeating-linear-gradient(-15deg,#7c8070 0 2px,#dedac4 2px 4px,#767969 4px 6px);border-radius:3px}
.tg-pin,.tg-marble{position:absolute;transform:translate(-50%,-50%);border-radius:50%}
.tg-pin{width:clamp(5px,1.25cqi,11px);height:clamp(6px,1.25cqi,11px);background:radial-gradient(circle at 35% 28%,#e6e5ba 0 12%,#7c8874 38%,#465c51 75%);box-shadow:1px 3px 2px #806d4e88}
.tg-slot{position:absolute;width:16.7%;height:15%;transform:translate(-50%,-50%);display:grid;place-items:center;background:#7d9a81;color:#263d31;border-inline:1px solid #877956;border-top:4px solid #d0ac72;font-weight:800;font-variant-numeric:tabular-nums}
.tg-slot:nth-last-of-type(3){background:#d9a660}.tg-slot.has-marble{background:#f7c775;box-shadow:inset 0 0 0 2px #9f6d35}
.tg-marble{width:clamp(10px,2.45cqi,19px);aspect-ratio:1;background:radial-gradient(circle at 33% 24%,#fff9db 0 12%,#b6d7c2 17%,#5a9a8a 45%,#325f5b 79%);box-shadow:1px 3px 3px #5d6552c2}
/* Nine burrows */
.tg .tg-mole-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 10px;padding:10px clamp(9px,5cqi,45px);background:repeating-linear-gradient(14deg,transparent 0 29px,#8ca46c38 30px 31px,transparent 32px 54px),linear-gradient(145deg,#c7c599,#a9b47b);border:5px solid #a38460}
.tg .tg-hole{position:relative;height:clamp(61px,11cqi,82px);min-width:0;border:0;background:transparent;isolation:isolate}
.tg-hole-edge{position:absolute;left:13%;right:13%;bottom:13%;height:33%;border-radius:50%;box-shadow:0 3px 0 #937957,inset 0 4px 5px #453c2f;background:#5d503e;border:3px solid #aa9065}
.tg-hole-edge::after{content:"";position:absolute;bottom:-5px;left:3%;right:3%;height:36%;border-radius:0 0 50% 50%;background:#ad925e;z-index:2}
.tg-mole-body{position:absolute;z-index:1;left:50%;bottom:21%;height:52%;width:32%;max-width:56px;transform-origin:bottom;transform:translateX(-50%) scaleY(.04);border-radius:48% 48% 29% 29%;background:radial-gradient(ellipse at 47% 65%,#caa47c 0 23%,transparent 25%),linear-gradient(105deg,#ad805b,#966b4d 70%);border:1px solid #806844;opacity:0;transition:transform .11s ease-out,opacity .11s}
.tg-mole-body::before,.tg-mole-body::after{content:"";position:absolute;z-index:-1;top:-3px;left:8%;width:23%;height:27%;border-radius:50%;background:#b68a6b;border:2px solid #967254}
.tg-mole-body::after{left:auto;right:8%}
.tg-mole-face{position:absolute;left:18%;right:18%;top:38%;height:31%;background:radial-gradient(circle at 20% 22%,#302d28 0 8%,transparent 10%),radial-gradient(circle at 80% 22%,#302d28 0 8%,transparent 10%),radial-gradient(ellipse at 50% 77%,#74483d 0 15%,transparent 18%)}
.tg-hole.up .tg-mole-body{transform:translateX(-50%) scaleY(1);opacity:1}
.tg-hole.caught::after{content:"✦";position:absolute;z-index:2;color:#ffdf75;font-size:25px;left:42%;bottom:26%}
.tg-hole-number{position:absolute;right:9%;bottom:8%;font-size:clamp(11px,1.7cqi,14px);font-weight:750;color:#514a33;font-variant-numeric:tabular-nums}
/* Three coins and the six-line record */
.tg-diviner-intro{display:flex;align-items:center;gap:12px;min-height:62px}
.tg .tg-diviner-photo{flex:none;width:clamp(50px,8cqi,72px);height:auto;aspect-ratio:1;border-radius:50%;background:#dbe4d6;border:1px solid #bccbb8;object-fit:contain}
.tg-diviner-intro strong{font-family:var(--serif);color:#375445;font-size:clamp(16px,2.8cqi,20px)}
#activity .tg .tg-diviner-intro .tg-instruction{margin:3px 0 1px}

.tg .tg-divination-mat{display:grid;grid-template-columns:.85fr 1.15fr;align-items:center;gap:clamp(8px,3cqi,32px);padding:clamp(15px,3.4cqi,26px);border:1px solid #42615b;background:repeating-linear-gradient(58deg,transparent 0 7px,#b6ae8610 8px 9px,transparent 10px 15px),radial-gradient(ellipse at 0 0,#536b63,#344d48 78%);box-shadow:inset 0 0 0 4px #9c916122}
.tg-coin-tray{aspect-ratio:1.4;position:relative;max-width:300px;width:100%;margin:auto;background:radial-gradient(ellipse at center,#534c3c 0 60%,#726047 61%,#9a8159 64%,transparent 66%);filter:drop-shadow(0 3px 2px #243e39)}
.tg-bronze-coin{position:absolute;display:grid;place-items:center;width:31%;aspect-ratio:1;border:3px solid #c1985f;border-radius:50%;color:#493a27;background:radial-gradient(ellipse at 32% 21%,#edd39b,#be9a60 67%,#9a7746);box-shadow:inset 0 0 0 2px #e2c288,inset 0 0 0 4px #ae8c59,0 3px 0 #7c6040}
.tg-bronze-coin:first-child{left:16%;top:37%}.tg-bronze-coin:nth-child(2){left:50%;top:38%}.tg-bronze-coin:nth-child(3){left:34%;top:8%}
.tg-bronze-coin.back{background:radial-gradient(ellipse at 32% 22%,#dbcb9f,#b09b6b 72%,#88794d)}
.tg-coin-hole{position:absolute;left:40%;top:26%;width:20%;aspect-ratio:1;background:#5e533b;border:1px solid #af9159;box-shadow:inset 0 1px 1px #342f23}
.tg-coin-side{position:absolute;left:0;right:0;bottom:10%;text-align:center;font-size:clamp(9px,1.75cqi,14px);font-family:var(--serif);line-height:1;white-space:nowrap}
.tg-lines{display:grid;gap:2px;list-style:none;margin:0;padding:0}
.tg-line-row{display:grid;grid-template-columns:2.4em minmax(24px,1fr) 4.9em;align-items:center;gap:clamp(4px,1.6cqi,13px);min-height:26px;font-size:clamp(11px,2.05cqi,15px);color:#e1ddca}
.tg-line-index{font-weight:650}.tg-line-label{text-align:right;font-variant-numeric:tabular-nums;color:#d9d8c6}
.tg-line-row.moving .tg-line-label{color:#f7c989;font-weight:700}
.tg-yao,.tg-hex-chart span{display:block;height:6px;color:#eedab2;border-radius:1px}
.tg-yao.waiting{height:1px;border-bottom:1px dashed #d3d3b777}
.tg .yang{background:currentColor}.tg .yin{background:linear-gradient(to right,currentColor 0 43%,transparent 43% 57%,currentColor 57%)}
.tg .tg-cast-result{padding:14px;margin-top:10px;border-radius:12px;background:#f1ebdb;border:1px solid #d2c4a4}
.tg-hex-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.tg-hex-summary{display:flex;align-items:center;gap:12px;background:#fffaf0;border:1px solid #d8cfb6;border-radius:8px;padding:10px;min-width:0}
.tg-hex-chart{display:grid;gap:3px;flex:none;width:clamp(19px,4.8cqi,38px)}
.tg-hex-chart span{height:3px;color:#476054}
.tg .tg-hex-summary h3,.tg .tg-hex-summary p{margin:0;color:#334c3d}
.tg .tg-hex-summary h3{font-size:clamp(16px,2.8cqi,22px)}
.tg .tg-hex-summary small,.tg .tg-hex-summary p{font-size:12px}
.tg .tg-moving-summary{margin:9px 0 4px;font-weight:650}
.tg .tg-reflection{margin:4px 0;color:#514e41}
@media(max-width:500px){
  #activity:is([data-kind="fortune"],[data-kind="balloons"],[data-kind="goldfish"],[data-kind="hoops"],[data-kind="pinball"],[data-kind="moles"]){width:96vw;max-height:95dvh}
  #activity:is([data-kind="fortune"],[data-kind="balloons"],[data-kind="goldfish"],[data-kind="hoops"],[data-kind="pinball"],[data-kind="moles"]) #activityBody{padding:10px 12px 15px}
  .tg .tg-divination-mat{grid-template-columns:.66fr 1.34fr;gap:5px;padding:10px}
  .tg-bronze-coin{border-width:1px}.tg-bronze-coin .tg-coin-side{font-size:8px}
  .tg-hex-summary{padding:7px;gap:6px}.tg .tg-cast-result{padding:8px}
}
@media(prefers-reduced-motion:reduce){.tg-hole .tg-mole-body,.tg .tg-balloon-skin{transition:none}}
