/* word-scramble overlay: letterpress desk look, rank card, pace line, two-row tray for long words. */
.ws { min-height: 440px; padding: 8px 6px 12px; border: 3px solid #231a33; border-radius: 18px;
  background: repeating-linear-gradient(0deg, rgb(35 26 51 / .035) 0 1px, transparent 1px 26px), linear-gradient(#fffaf0, #fdf1d6);
  box-shadow: 0 5px 0 #231a33, 0 14px 22px -12px rgb(35 26 51 / .45); }
.ws-panel { border-radius: 15px; background: linear-gradient(#fffdf5, #fff4da); justify-content: safe center; overflow-y: auto; }
.ws-tray { flex-wrap: wrap; gap: 8px; max-width: 360px; margin: 0 auto; padding: 12px 10px; border-radius: 14px;
  background: linear-gradient(#b9814a, #9a6636); box-shadow: inset 0 3px 7px rgb(0 0 0 / .4), 0 2px 0 rgb(255 255 255 / .6); }
.ws-tray .ws-tile { width: 50px; height: 56px; }
.ws-tray:has(.ws-tile:nth-child(7)) { max-width: 232px; }
.ws-slots { gap: 5px; }
.ws-slot { width: min(44px, calc((100% - 35px) / 8)); }
.wsp-pace { text-align: center; font: 700 .78rem/1.2 'JetBrains Mono', monospace; color: #475569; min-height: 1.2em; margin: -6px 0 8px; }
.wsp-pace.coach { color: #231a33; background: #fde68a; border-radius: 99px; padding: 4px 10px; }
.wsp-pace.hot { color: #15803d; }
.wsp-card { width: 100%; max-width: 330px; display: grid; gap: 6px; text-align: left; }
.wsp-rank { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 600 .74rem/1.2 'JetBrains Mono', monospace; color: #475569; }
.wsp-rank b { font: 800 1rem/1.1 var(--font-display, sans-serif); color: #231a33; }
.wsp-bar { height: 8px; border-radius: 99px; background: #e7d6b2; overflow: hidden; box-shadow: inset 0 1px 2px rgb(90 55 10 / .4); }
.wsp-bar i { display: block; height: 100%; background: linear-gradient(#fbbf24, #d97706); border-radius: 99px; }
.wsp-goal { font-size: .78rem; line-height: 1.3; color: #231a33; background: #fff; border: 2px solid #231a33; border-radius: 10px; padding: 6px 9px; }
.wsp-goal span { font: 800 .68rem/1 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .04em; color: #b45309; margin-right: 4px; }
.wsp-goal.done { background: #dcfce7; border-color: #15803d; }
.wsp-goal.done span { color: #15803d; }
.wsp-streak { font: 700 .74rem/1 'JetBrains Mono', monospace; color: #b45309; }
.wsp-up { font: 800 1rem/1.2 var(--font-display, sans-serif); color: #fff; background: #16a34a; border-radius: 99px; padding: 5px 12px; text-align: center; animation: wsp-pop .5s ease-out 2; }
.wsp-nudge { animation: wsp-nudge .9s ease-in-out infinite; }
.ws-tile.wsp-nudge { outline: 3px solid #16a34a; outline-offset: 2px; }
.ws-tool.wsp-nudge { outline: 3px solid #16a34a; outline-offset: 2px; }
@keyframes wsp-pop { 0% { transform: scale(.8) } 60% { transform: scale(1.12) } 100% { transform: scale(1) } }
@keyframes wsp-nudge { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
body { padding-bottom: env(safe-area-inset-bottom); }
.game-wrap { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
@media (max-width: 380px) { .ws-tray .ws-tile { width: 46px; height: 52px; } .ws-tray:has(.ws-tile:nth-child(7)) { max-width: 212px; } }
@media (prefers-reduced-motion: reduce) { .wsp-nudge, .wsp-up { animation: none !important; } }
