/* Owner feedback 2026-11-10 (Telegram msg 90). Teal = interactive, gold = brand/reward only. */

/* The name belongs beside the mark on every phone width, not only on wide screens. */
@media(max-width:420px){.app[data-ui-state="playing"] .nightline-brand>span{display:inline-flex}.app[data-ui-state="playing"] .nightline-brand{gap:6px!important}.nightline-brand{font-size:18px}}
@media(max-width:360px){.nightline-brand>span,.app[data-ui-state="playing"] .nightline-brand>span{display:inline-flex}.nightline-brand{font-size:16px;gap:4px!important}.play-exit-label{display:none}}
/* The brand is a button: it answers touch and hover, and a slow sheen keeps it alive. */
.nightline-brand{position:relative;border-radius:10px;transition:transform 160ms var(--ease-out,ease-out),background-color 160ms}
.nightline-brand:hover{background:var(--accent-wash)}
.nightline-brand:active{transform:scale(.95)}
.nightline-brand svg{filter:drop-shadow(0 0 0 transparent);animation:brand-glint 9s ease-in-out 2s infinite}
@keyframes brand-glint{0%,88%,100%{filter:drop-shadow(0 0 0 transparent)}93%{filter:drop-shadow(0 0 6px color-mix(in oklch,var(--gold-text) 70%,transparent))}}

/* "Saved" confirmation next to the word count. */
.saved-cue:empty{display:none}
.saved-cue{display:inline-flex;align-items:center;gap:4px;margin-left:10px;font-size:12px;font-weight:600;color:var(--success);opacity:0}
.saved-cue::before{content:'';width:12px;height:12px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.saved-cue--show{animation:saved-in 3.2s ease-out both}
@keyframes saved-in{0%{opacity:0;translate:0 3px}12%,78%{opacity:1;translate:0 0}100%{opacity:0}}

/* Unseen updates: a small dot on the sparkle plus a gentle twinkle. */
#nightlineUpdates{position:relative}
.updates-dot{position:absolute;top:7px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--bg)}
#nightlineUpdates.has-unseen svg{animation:updates-twinkle 2.4s ease-in-out infinite}
@keyframes updates-twinkle{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.14) rotate(12deg)}}

/* The Hint button keeps a quiet sheen while playing and breathes after a quiet spell. */
.app[data-ui-state="playing"] #hintBtn{overflow:hidden}
.app[data-ui-state="playing"] #hintBtn::before{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(105deg,transparent 35%,color-mix(in oklch,var(--accent) 22%,transparent) 50%,transparent 65%);background-size:250% 100%;background-position:120% 0;animation:hint-sheen 8s ease-in-out 3s infinite;z-index:1}
@keyframes hint-sheen{0%,80%{background-position:120% 0}95%,100%{background-position:-20% 0}}
#hintBtn.hint-glow{border-color:var(--accent)!important;animation:hint-breathe 2.2s ease-in-out infinite}
@keyframes hint-breathe{0%,100%{box-shadow:0 0 0 0 color-mix(in oklch,var(--accent) 0%,transparent)}50%{box-shadow:0 0 0 4px color-mix(in oklch,var(--accent) 30%,transparent),0 0 22px color-mix(in oklch,var(--accent) 35%,transparent)}}

/* Pseudo-elements are invalid inside :is(), so each selector stands alone. */
.app[data-motion-hints="false"] .nightline-brand svg,
.app[data-motion-hints="false"] #nightlineUpdates.has-unseen svg,
.app[data-motion-hints="false"] #hintBtn::before,
.app[data-motion-hints="false"] #hintBtn.hint-glow{animation:none}
.app[data-motion-hints="false"] #hintBtn.hint-glow{box-shadow:0 0 0 3px color-mix(in oklch,var(--accent) 35%,transparent)}
@media(prefers-reduced-motion:reduce){
 .nightline-brand svg,#nightlineUpdates.has-unseen svg,.app[data-ui-state="playing"] #hintBtn::before,#hintBtn.hint-glow,.saved-cue--show{animation:none}
 .saved-cue--show{opacity:1}
 #hintBtn.hint-glow{box-shadow:0 0 0 3px color-mix(in oklch,var(--accent) 35%,transparent)}
 .nightline-brand{transition:none}
}

/* attention.js hides the first-board strip for returning players; its display:flex must not win. */
.play-gesture-cue[hidden]{display:none}
