/* Game time locks: the Locked tag on the Games tab, locked tiles, the Games page banner,
   and the pop-ups (read to unlock, done for today, time's up, games unlocked). */
/* Locked tag: the same gold pill as NEW, with just the padlock, about as wide as NEW. */
.nav-tag.nav-tag--locked { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; box-sizing: border-box; }
.nav-tag.nav-tag--locked .ui-icon { width: 1.2em; height: 1.2em; stroke-width: 2.6; }

.game-preview-tile.is-locked { position: relative; }
/* The New label goes dull with the rest of a locked tile. */
.game-preview-tile.is-locked .game-tile-badge { z-index: 5; background: #8d7a99 !important; color: #efe6f4 !important; box-shadow: none !important; opacity: .75; filter: saturate(.3); }
.game-preview-tile.is-locked .game-play-label { background: #efe3f7 !important; color: #5a2f78 !important; border-color: #d8c3e3 !important; display: inline-flex; align-items: center; gap: 6px; }
.game-preview-tile.is-locked .game-play-label .ui-icon { width: 16px; height: 16px; }
.game-lock-badge { position: absolute; top: 14px; right: 14px; z-index: 3; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #ffe39a, #f0a634); border: 3px solid #fff8e5; color: #5a2f78; box-shadow: 0 6px 0 #a5661a55, 0 10px 22px #1d0b2e40; animation: lock-bob 2.6s ease-in-out infinite; }
.game-lock-badge .ui-icon { width: 26px; height: 26px; }

.games-lock-banner { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin: 22px 0 6px; padding: 20px 24px; border: 3px solid #f0d9a8; border-radius: 28px; background: linear-gradient(135deg, #f4e9fb, #fffaf0 60%, #fff0cf); color: #4b2462; box-shadow: 0 10px 0 #b88fc955, 0 22px 44px #1d0b2e45; }
.games-lock-banner .tiny { margin: 0 0 4px; color: #b0731f; }
.games-lock-banner h2 { margin: 0 0 10px; font: 800 clamp(20px, 2.6vw, 26px)/1.2 ui-rounded, "Trebuchet MS", system-ui, sans-serif; }
.games-lock-banner p { margin: 0; color: #6a4a7c; }
.games-lock-banner .ui-button { margin-top: 14px; }
.games-lock-banner-art { width: 104px; height: 104px; }
.games-lock-banner.is-limit { background: linear-gradient(135deg, #3d2156, #5a2f78); color: #fff8e5; border-color: #8e6aa8; }
.games-lock-banner.is-limit p { color: #eadcf5; }
.games-lock-banner.is-limit .tiny { color: #ffe08a; }

.lock-goals { display: grid; gap: 8px; }
.lock-goal { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; }
.lock-goal .lock-meter { max-width: none; background: #e4d3ee; height: 12px; }
.lock-goal-count { font-variant-numeric: tabular-nums; color: #6a4a7c; font-size: 14px; }
.lock-goal-or { justify-self: center; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #b0731f; }

.lock-art { width: 100%; height: 100%; overflow: visible; }
.lock-art .lock-shackle { transform-origin: 108px 74px; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.lock-art.is-open .lock-shackle { transform: translateY(-14px) rotate(28deg); }
.lock-art .lock-sparkles { opacity: 0; }
.lock-art.is-open .lock-sparkles, .lock-moon .lock-sparkles { opacity: 1; animation: lock-twinkle 1.6s ease-in-out infinite alternate; }

.lock-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; overflow: visible; }
.lock-dialog::backdrop { background: #26133880; backdrop-filter: blur(4px); }
.lock-dialog[open] .lock-dialog-card { animation: lock-card-in .4s cubic-bezier(.3, 1.4, .5, 1) both; }
.lock-dialog-card { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 8px; padding: 26px 26px 24px; text-align: center; border: 3px solid #f0d9a8; border-radius: 30px; background: linear-gradient(160deg, #f4e9fb, #fffaf0 55%, #fff0cf); color: #4b2462; box-shadow: 0 12px 0 #b88fc955, 0 30px 70px #160b3666; }
.lock-dialog-card .tiny { margin: 6px 0 0; color: #b0731f; letter-spacing: .16em; }
.lock-dialog-card h2 { margin: 0; font: 800 clamp(26px, 6vw, 34px)/1.1 ui-rounded, "Trebuchet MS", system-ui, sans-serif; }
.lock-dialog-card > p { margin: 0; color: #6a4a7c; font-size: 16px; line-height: 1.5; }
.lock-dialog-card .lock-goals { width: 100%; margin-top: 6px; }
.lock-dialog-art { position: relative; width: 132px; height: 132px; }
.lock-dialog-art .lock-book { position: absolute; width: 70px; right: -34px; bottom: -4px; transform: rotate(8deg); filter: drop-shadow(0 4px 6px #1d0b2e33); }
.lock-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }
.lock-dialog--limit .lock-dialog-card, .lock-dialog--timeup .lock-dialog-card { background: linear-gradient(160deg, #3d2156, #5a2f78 70%); color: #fff8e5; border-color: #8e6aa8; }
.lock-dialog--limit .lock-dialog-card > p, .lock-dialog--timeup .lock-dialog-card > p { color: #eadcf5; }
.lock-dialog--limit .tiny, .lock-dialog--timeup .tiny { color: #ffe08a !important; }
.lock-wiggle .lock-art { animation: lock-wiggle .7s ease .3s 2; }
/* Time's up: the shackle snaps shut */
.lock-snap .lock-art .lock-shackle { animation: lock-snap .55s .35s cubic-bezier(.5, 0, .3, 1.4) forwards; }
/* Unlocked: the padlock pops and the shackle swings open */
.lock-pop .lock-art { animation: lock-pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.lock-pop .lock-art .lock-shackle { animation: lock-open .6s .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.lock-dialog--unlocked .lock-play { font-size: 18px; padding-inline: 26px; animation: lock-glow 1.6s ease-in-out .9s infinite; }

.game-lock-settings { display: grid; gap: 10px; margin: 16px 0 0; padding: 16px; border: 1px solid #e3d3e8; border-radius: 16px; background: #fffdf8; }
.game-lock-settings legend { padding: 0 6px; font-weight: 800; color: #4b2462; }
.game-lock-settings .note { margin: 0; font-size: 13px; }
.game-lock-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.game-lock-settings label:not(.toggle) { display: grid; gap: 6px; font-weight: 700; font-size: 14px; color: #4c285d; }
.game-lock-settings select, .game-lock-settings input[type=text] { min-height: 44px; padding: 8px 12px; border: 1px solid #cdb4dc; border-radius: 12px; font: inherit; font-size: 16px; color: #452453; background: #fff; }
.game-lock-or { padding-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #b0731f; }
.game-lock-limit span { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.game-lock-limit input { width: 110px; }
.game-lock-games { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.game-lock-games-label { font-weight: 700; font-size: 14px; color: #4c285d; }

@keyframes lock-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
@keyframes lock-twinkle { from { opacity: .4; } to { opacity: 1; } }
@keyframes lock-card-in { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes lock-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes lock-snap { from { transform: translateY(-14px) rotate(28deg); } to { transform: none; } }
@keyframes lock-open { from { transform: none; } to { transform: translateY(-14px) rotate(28deg); } }
@keyframes lock-pop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes lock-glow { 0%, 100% { box-shadow: 0 0 0 0 #ffe08a00; } 50% { box-shadow: 0 0 0 8px #ffe08a88; } }
@media (max-width: 600px) {
  .games-lock-banner { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 18px; }
  .games-lock-banner-art { width: 84px; height: 84px; }
  .lock-goal { grid-template-columns: 50px 1fr; } .lock-goal-count { grid-column: 1 / -1; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .game-lock-badge, .lock-art, .lock-art .lock-shackle, .lock-sparkles, .lock-dialog-card, .lock-play { animation: none !important; }
}

/* Locked tiles: a plum veil with a big padlock over the picture, muted card. */
.game-lock-host { position: relative; }
.game-lock-veil { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 8px; background: radial-gradient(ellipse at 50% 45%, #5a2f78bb, #2d1b48dd); backdrop-filter: blur(2px) saturate(.6); -webkit-backdrop-filter: blur(2px) saturate(.6); }
.game-lock-veil-art { width: clamp(84px, 22%, 120px); aspect-ratio: 1; filter: drop-shadow(0 10px 16px #1d0b2e66); animation: lock-bob 2.6s ease-in-out infinite; }
.game-lock-veil-label { padding: 6px 16px; border-radius: 99px; background: #fff8e5; color: #4b2462; font: 800 15px/1.2 ui-rounded, "Trebuchet MS", system-ui, sans-serif; letter-spacing: .02em; box-shadow: 0 4px 0 #b88fc966; }
.game-preview-tile.is-locked { box-shadow: 0 10px 0 #2d1b4855, 0 20px 40px #1d0b2e45 !important; }
.game-preview-tile.is-locked .game-preview-copy { opacity: .82; }
.game-preview-tile.is-locked .game-lock-badge { display: none; }
@media (prefers-reduced-motion: reduce) { .game-lock-veil-art { animation: none; } }

/* Grown-ups: extend time (on the done-for-today pop-ups) */
.lock-extend { width: 100%; margin-top: 6px; }
.lock-extend-open { color: inherit; opacity: .85; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; padding: 8px; }
.lock-extend-form { display: grid; gap: 10px; margin-top: 8px; padding: 14px; border-radius: 18px; background: #fff8e5; color: #4b2462; text-align: left; }
.lock-extend-title { margin: 0; font-weight: 800; }
.lock-extend-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.lock-extend-form input { min-height: 44px; padding: 8px 12px; border: 1px solid #cdb4dc; border-radius: 12px; font: inherit; font-size: 16px; }
.lock-extend-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lock-extend-choices .ui-button { min-width: 0; padding-inline: 6px; }
.lock-extend-error { margin: 0; min-height: 1.2em; font-size: 14px; color: #a43d39; }

/* Parents → Feedback: the public Contact form inside the parent area, without the
   full-page height the public section uses. */
.parent-feedback .public-contact { min-height: 0; padding-block: clamp(8px, 2vw, 24px); }
