/* Clear links and compact LCD controls, shared by the site and handbook. */
a:not(.brand):not(.docs-brand):not(.primary-link):not(.return-link):not(.skip-link){text-decoration:none}
.community-link,.inline-link,.hero-links>a:not(.primary-link),main p a{color:#526c32;font-weight:600}
a:not(.brand):not(.docs-brand):not(.primary-link):not(.return-link):hover{background:transparent;color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.footer-links a,.page-links>a,.status-links a{transition:opacity .15s}
.footer-links a:hover,.page-links>a:hover,.status-links a:hover{opacity:.7}
.lcd .coil-guide{display:block;border:0;padding:8px 10px;font-weight:600;font-size:12px;text-align:center;text-decoration:none;color:#425c27}
.lcd button.action:not(:disabled):hover{background:#40572b;color:#e2f2b9}
.lcd button.secondary:not(:disabled):hover,.coil-tabs button:not(.active):hover{background:#26351c20}
.lcd .text-button{text-decoration:none}
.lcd .text-button:not(:disabled):hover{background:transparent;color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.coil-content{overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start}
.stake-form,.position-view{margin-block:auto}
.coil-preview{gap:8px}
.preview-content{display:flex;flex-direction:column;gap:8px;margin-block:auto;min-height:min-content}
.preview-amount{border:1px solid var(--ink);padding:7px 10px;font-size:29px;font-weight:bold;display:flex;justify-content:space-between;align-items:center}
.preview-amount span{font-size:12px;font-weight:normal}
.preview-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.preview-facts>div:last-child{text-align:right}
.preview-facts strong{display:block;font-size:20px;margin-top:4px}
.preview-return{display:flex;justify-content:space-between;align-items:center;gap:8px}
.preview-content p,.preview-note{margin:0;line-height:1.4}
.preview-note{text-align:center;font-size:10px}
.coil-preview .claim-row{padding-top:7px}
.coil-preview .claim-row strong{font-size:25px}
.coil-preview .claim-row button{font-size:12px;padding:8px 12px}
/* Tighten spacing before scrolling becomes necessary. Long positions can scroll. */
@container lcd (max-height:520px){
 .coil-view{gap:6px}.stake-form,.position-view,.preview-content{gap:5px}
 .coil-tabs button{padding:6px}.terms{margin:2px 0;font-size:12px;line-height:1.35}
 .form-foot{margin:0}.estimate-grid{margin:0}.estimate-grid strong{margin-top:2px}
 .lcd button.action,.lcd button.secondary{padding:7px 9px}
 .preview-amount{font-size:23px;padding:5px 9px}.preview-facts strong{font-size:17px;margin-top:2px}
 .preview-facts .label,.preview-return .label{font-size:10px}.preview-return .micro{font-size:10px}
 .lcd .coil-guide{padding:6px 8px;font-size:11px}.coil-preview .claim-row strong{font-size:21px}
}
@container lcd (min-aspect-ratio:1.2/1){.coil-preview .preview-note{display:none}.preview-facts strong{font-size:15px}.preview-content{gap:4px}.preview-amount{font-size:20px}.preview-content .terms{font-size:11px}}
@container lcd (max-height:430px) and (max-aspect-ratio:1.2/1){
 .stake-form .form-foot>.micro{display:none}.stake-form .form-foot:not(:has(button)){display:none}
 .preview-content{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px;margin-block:auto}
 .preview-content>.between{grid-column:1;grid-row:1}.preview-content>.between .micro{display:none}
 .preview-amount{grid-column:1;grid-row:2;font-size:22px}
 .preview-facts{grid-column:2;grid-row:1/3;display:flex;flex-direction:column;gap:4px;align-items:flex-end}
 .preview-facts>div{text-align:right}.preview-facts strong{font-size:14px;margin-top:0}
 .preview-content>.terms,.preview-connect,.coil-guide{grid-column:1/-1}
 .preview-return{display:none}.preview-content>.terms{font-size:11px}
}
.snake-tooltip{position:fixed;z-index:10000;max-width:min(250px,calc(100vw - 24px));padding:9px 12px;background:#26351c;color:#c9df83;border:1px solid #a4bc63;box-shadow:3px 3px 0 #26351c38;font:12px/1.45 var(--mono,'Courier New',monospace);pointer-events:none;letter-spacing:0}
.snake-tooltip[hidden]{display:none}
/* Dialog content must fit its actual LCD, not an inherited minimum height. */
#dialog-content{min-height:0;gap:8px;overflow-y:auto;overscroll-behavior:contain}
#dialog-content>p{margin:3px 0;line-height:1.4}
#dialog-content>.dialog-actions{flex-shrink:0;flex-wrap:wrap;align-items:stretch;gap:7px;padding-top:5px}
#dialog-content>.dialog-actions>p{flex-basis:100%;margin:0 0 4px;line-height:1.4}
.wallet-summary{display:grid;grid-template-columns:1fr;gap:12px;flex:1;align-content:center}
.wallet-summary .wallet-readout{min-width:0;padding:12px 0;gap:7px;font-size:13px}
.wallet-summary .wallet-readout strong{font-size:32px;overflow-wrap:anywhere;line-height:1.1}
#dialog-content:has(.wallet-summary){gap:10px}
.player-address{overflow-wrap:anywhere}
.wallet-identity{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid currentColor}
.wallet-daily{flex-shrink:0;padding:8px 0;font-size:13px}
.wallet-daily .meter{margin:9px 0 6px}
.wallet-daily p{margin:0;line-height:1.4}
#dialog-content>.wallet-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.wallet-actions>.action{grid-column:1/-1}
#dialog-content:has(.wallet-daily) .wallet-summary{gap:4px}
#dialog-content:has(.wallet-daily) .wallet-readout{padding:8px 0}
.player-art{position:relative;flex:1;min-height:70px;margin:4px 0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.player-art img{display:block;width:100%;height:100%;max-height:330px;object-fit:contain;filter:grayscale(1) contrast(4);mix-blend-mode:multiply;opacity:.84;animation:player-reveal .45s steps(5) both}
.pixel-signal{position:absolute;right:12%;top:16%;display:flex;align-items:flex-end;gap:3px}
.pixel-signal i{width:4px;height:4px;background:var(--ink);animation:player-signal 2.4s steps(2,end) 2}
.pixel-signal i:nth-child(2){height:8px;animation-delay:.2s}.pixel-signal i:nth-child(3){height:12px;animation-delay:.4s}
@keyframes player-reveal{from{clip-path:inset(0 0 100%)}to{clip-path:inset(0)}}
@keyframes player-signal{0%,100%{opacity:.3}50%{opacity:1}}
.sound-toggle{background:transparent;border:1px solid currentColor;padding:5px 6px;font-size:10px;white-space:nowrap;min-height:30px}
.sound-toggle[aria-pressed=true]{background:var(--ink);color:var(--lcd)}
.sound-toggle:hover{opacity:.7}
.game-score{display:inline-block;transform-origin:center;font-variant-numeric:tabular-nums}
[data-stat],[data-protocol],.live-claim,.live-nest,.expiry-clock{font-variant-numeric:tabular-nums}
.live-unlock-bar,.expiry-bar,.community-track>span,.split-track>span{transition:width .65s steps(16,end)}
.day-bar{transform-origin:bottom;animation:bar-reveal .6s steps(12,end) both}
@keyframes bar-reveal{from{transform:scaleY(0)}to{transform:scaleY(1)}}
.connection-signal{display:flex;align-items:flex-end;justify-content:center;gap:7px;flex:1;min-height:50px;padding:20px}
.connection-signal i{width:12px;height:16px;background:var(--ink);animation:player-signal 1.4s steps(2,end) infinite}
.connection-signal i:nth-child(2){height:28px;animation-delay:.2s}.connection-signal i:nth-child(3){height:40px;animation-delay:.4s}.connection-signal i:nth-child(4){height:52px;animation-delay:.6s}
.wallet-connecting{animation:player-signal 1.4s steps(2,end) infinite}
@media(prefers-reduced-motion:reduce){.live-unlock-bar,.expiry-bar,.community-track>span,.split-track>span{transition:none}.day-bar,.connection-signal i,.wallet-connecting,.screen.switching{animation:none}}
@media(prefers-reduced-motion:reduce){.player-art img,.pixel-signal i{animation:none}}
@container lcd (max-height:450px){
 #dialog-content:has(.wallet-summary){gap:6px}
 #dialog-content>p{font-size:11px;margin:1px 0}
 #dialog-content .dialog-actions>p{font-size:11px}
 .wallet-summary{gap:6px}
 .wallet-summary .wallet-readout{padding:6px 0;font-size:12px}
 .wallet-summary .wallet-readout strong{font-size:27px}
}

/* Keep secondary game actions together without adding screen overflow. */
.game-secondary-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px}
.game-secondary-actions button{min-width:0}
.home-mark{position:relative;display:block;flex-shrink:0;line-height:0}
.home-mark img{display:block}
.home-snake{position:absolute;left:-50%;top:-20%;width:200%;height:120%;pointer-events:none;image-rendering:pixelated}
.wallet-copy{background:transparent;padding:3px 0;text-align:left;border-bottom:1px dotted currentColor;min-width:13ch}
.wallet-copy:hover{background:var(--ink);color:var(--lcd)}
#game-progress{display:inline-flex;align-items:center;justify-content:flex-end;gap:7px;font-variant-numeric:tabular-nums}
#game-progress:before{content:'';display:inline-block;width:11px;height:12px;background:currentColor;clip-path:polygon(55% 0,85% 0,85% 18%,65% 18%,65% 32%,100% 32%,100% 82%,82% 82%,82% 100%,18% 100%,18% 82%,0 82%,0 32%,45% 32%,45% 15%,55% 15%)}
.sleeping-snake{display:block;flex-shrink:0;width:100px;height:30px;margin:0 auto;color:var(--ink);animation:snake-snooze 2.8s steps(3,end) 3}
.new-best h2{position:relative}
.new-best h2:before,.new-best h2:after{content:'+';position:absolute;font-size:16px;top:0;animation:record-sparkle .9s steps(3,end) 2}
.new-best h2:before{left:0}.new-best h2:after{right:0;animation-delay:.15s}
.withdraw-ready{animation:ready-pulse 1.2s steps(4,end) 2}
@keyframes snake-snooze{50%{transform:translateY(-2px)}}
@keyframes record-sparkle{0%,100%{opacity:0;transform:translateY(4px) scale(.6)}50%{opacity:1;transform:translateY(-4px) scale(1)}}
@keyframes ready-pulse{50%{opacity:.65}}
#game-overlay.game-over-reveal{animation:game-over-arrive .22s steps(5,end) both}
@keyframes game-over-arrive{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#game-overlay.game-over-reveal{animation:none}}
@media(prefers-reduced-motion:reduce){.sleeping-snake,.new-best h2:before,.new-best h2:after,.withdraw-ready{animation:none}.new-best h2:before,.new-best h2:after{display:none}}
