/* Playable demo pages. Each one wears its game's colours, like the bands on the home page. */
.demo-page .logo { font-size: 28px; }
.demo-page .site-header nav a { color: inherit; opacity: 0.75; }
.demo-page .site-header nav a:hover { opacity: 1; color: inherit; }
.demo-band { padding: 28px 16px 44px; }
.demo-inner { width: min(520px, 100%); margin: 0 auto; }
.demo-below { padding: 40px 16px 72px; }
.demo-head { text-align: center; margin: 12px 0 24px; }
.demo-title { margin: 0 0 14px; font-family: "Dela Gothic One", "Baloo 2", sans-serif; font-weight: 400; font-size: clamp(46px, 13vw, 76px); line-height: 0.95; letter-spacing: 0; }
.demo-lead { margin: 16px auto 0; max-width: 28em; font-size: 17px; line-height: 1.5; }
.pill.small { min-height: 44px; padding: 0 20px; font-size: 17px; }

.hud { display: flex; align-items: center; gap: 22px; margin-bottom: 14px; }
.hud .stat { display: flex; flex-direction: column; line-height: 1.1; }
.hud .stat span { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65; }
.hud .stat b { font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 32px; font-variant-numeric: tabular-nums; }
.hud .pill { margin-left: auto; cursor: pointer; }

.game-card { position: relative; border-radius: 30px; padding: 18px; }
.board { position: relative; width: 100%; border-radius: 22px; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; -webkit-tap-highlight-color: transparent; }
.slot { position: absolute; left: 0; top: 0; border-radius: 17%; pointer-events: none; }

.over { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; border-radius: 26px; background: rgba(42, 34, 51, 0.55); }
.over[hidden] { display: none; }
.over-card { background: #fffdf7; color: #2a2233; border-radius: 24px; padding: 26px 34px; text-align: center; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.45); }
.over-card h2 { margin: 0 0 6px; font-size: 34px; }
.over-card p { margin: 0 0 18px; font-size: 18px; }
.over-card .pill { cursor: pointer; }

.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: 17px; line-height: 1.5; }
.how b { font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 19px; }
.demo-cta { margin-top: 40px; padding-top: 28px; border-top: 3px solid #2a2233; }
.demo-cta p { margin: 0 0 18px; font-size: 17px; }
.demo-cta .h-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* ------------------------------------------------------------ Paper Garden */
.demo-garden { background: #f4eee3; color: #2e4636; }
.demo-garden .demo-band { background: #2e4636; color: #f4eee3; }
.demo-garden .chip { background: #ffc933; border: 3px solid #2a2233; color: #2a2233; }
.demo-garden .game-card { background: #f4eee3; color: #2e4636; border: 4px solid #cbbd9f; }
.demo-garden .board { background: #e6dcc9; border-radius: 20px; }
.demo-garden .slot { background: #efe6d3; border-radius: 12%; }
.demo-garden .slot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10%; height: 10%; margin: -5%; border-radius: 50%; background: #d4c7ad; }
.demo-garden .how b, .demo-garden .demo-cta { color: #2e4636; }
.demo-garden .demo-cta { border-top-color: #2e4636; }

.t { position: absolute; left: 0; top: 0; box-sizing: border-box; background: #fffdf8; border-radius: 12%; box-shadow: 0 0 0 2px #e6dac4 inset; pointer-events: none; }
.t svg { display: block; }
.t .ln, .tile-box .ln { fill: none; stroke: #2e4636; stroke-width: 11; }
.t .dot, .tile-box .dot { fill: #2e4636; }
.t.drop { animation: g-drop 0.2s cubic-bezier(0.3, 1.4, 0.5, 1); }
.t.preview { opacity: 0.5; }
.t.floater { position: fixed; z-index: 60; box-shadow: 0 0 0 2px #e6dac4 inset, 0 14px 22px -10px rgba(46, 70, 54, 0.55); }
.t.floater.snapped { transition: transform 0.06s ease-out; }
@keyframes g-drop { from { transform-origin: center; opacity: 0.4; } to { opacity: 1; } }
.t.drop { transform-origin: center; }
.mark { position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #ee7b3b; box-shadow: 0 0 0 3px #fffdf8; pointer-events: none; z-index: 3; }

.ghost { position: absolute; left: 0; top: 0; box-sizing: border-box; border-radius: 12%; pointer-events: none; z-index: 2; }
.ghost.solo { background: #fffdf8; box-shadow: 0 0 0 2px #e6dac4 inset; transition: background 0.35s ease calc(var(--o) * 70ms); }
.ghost svg { display: block; }
.ghost .ln { fill: none; stroke: #2e4636; stroke-width: 11; transition: stroke 0.3s ease calc(var(--o) * 70ms); }
.ghost .dot { fill: #2e4636; transition: fill 0.3s ease calc(var(--o) * 70ms); }
.ghost.hot.solo { background: #fff1e4; }
.ghost.hot .ln { stroke: #c45a33; }
.ghost.hot .dot { fill: #c45a33; }
.ghost .fl { position: absolute; width: 44%; height: 44%; transform: translate(-50%, -50%) scale(0); }
.ghost.hot .fl { animation: g-bloom 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) calc(var(--o) * 70ms + 400ms) forwards; }
.ghost.fade { opacity: 0; transition: opacity 0.6s ease calc(var(--o) * 70ms); }
@keyframes g-bloom { from { transform: translate(-50%, -50%) scale(0) rotate(-50deg); } to { transform: translate(-50%, -50%) scale(1) rotate(0); } }
.float { position: absolute; z-index: 5; transform: translate(-50%, -50%); font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 30px; line-height: 1; color: #c45a33; text-shadow: 0 2px 0 #fffdf8, 0 0 8px #fffdf8; pointer-events: none; animation: g-float 1.3s ease-out forwards; }
@keyframes g-float { 0% { opacity: 0; transform: translate(-50%, -30%); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -150%); } }
.demo-garden .cursor { position: absolute; left: 0; top: 0; z-index: 6; border-radius: 12%; border: 4px solid #2e4636; pointer-events: none; }
.demo-garden .cursor[hidden] { display: none; }

.tip { margin: 14px 0 0; font-size: 15px; line-height: 1.4; text-align: center; opacity: 0.8; }
.tip[hidden] { display: none; }
.tray { display: flex; align-items: flex-end; justify-content: center; gap: 22px; margin-top: 16px; }
.tray-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tray .lab { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65; }
.tile-box { position: relative; box-sizing: border-box; padding: 0; background: #fffdf8; border: 0; border-radius: 12%; box-shadow: 0 0 0 2px #e6dac4 inset; }
.tile-box.big { width: 132px; height: 132px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.tile-box.small { width: 76px; height: 76px; opacity: 0.9; }
button.tile-box { cursor: pointer; }
.tile-box.lifted { opacity: 0.35; }
.tile-box svg { display: block; width: 100%; height: 100%; }
#hold:empty { background: transparent; box-shadow: none; border: 3px dashed #cbbd9f; }
.tray .pill.small { min-height: 38px; padding: 0 22px; font-size: 16px; cursor: pointer; }
.tray .pill.ink { background: #2e4636; color: #f4eee3; }
.demo-garden .demo-inner { width: min(440px, 100%); }

/* On a phone the whole game should fit on one screen, so the intro gets out of the way. */
@media (max-width: 600px) {
  .demo-page .site-header { padding: 12px 0 10px; }
  .demo-page .site-header nav { display: none; }
  .demo-band { padding: 14px 12px 26px; }
  .demo-head { margin: 2px 0 14px; }
  .demo-title { font-size: 38px; margin-bottom: 10px; }
  .demo-lead { display: none; }
  .game-card { padding: 12px; border-radius: 24px; }
  .hud { margin-bottom: 10px; }
  .tip { margin-top: 10px; font-size: 14px; }
  .tray { gap: 16px; margin-top: 10px; }
  .tile-box.big { width: 108px; height: 108px; }
  .tile-box.small { width: 64px; height: 64px; }
  .demo-below { padding: 28px 16px 56px; }
}
