/* =====================================================================
   samle.css – Flaggsamleren (flagg-samle.html)
   ---------------------------------------------------------------------
   1. The top        4. Playing                7. Praise, toasts, new flags
   2. Start          5. The challenge          8. Effects (confetti, sparks …)
   3. Buttons        6. Pause, goodbye, album, badges     9. Phones
   Colours from css/flag-theme.css (loaded after this file).
   ===================================================================== */

/* ---------- 1. The top ---------- */
.top { display: flex; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 6px; }
.top .mask { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: .03em; }
.home { display: inline-flex; align-items: center; gap: 8px; color: var(--dark); font-weight: 600; font-size: .9rem; text-decoration: none; }
.home img { width: 28px; height: 28px; }
.home:hover { color: var(--primary); }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 99px; background: #fff; }
.lang button { padding: 4px 10px; border: 0; border-radius: 99px; background: none; color: #999; font: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .05em; cursor: pointer; }
.lang button:hover { color: var(--dark); }
.lang button[aria-pressed="true"] { background: var(--primary); color: #fff; }

.sound-button { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--dark); cursor: pointer; }
.sound-button + .lang { margin-left: 0; }
.sound-button svg { width: 20px; height: 20px; }
.sound-button .cross { display: none; }
.sound-button.off { color: #aaa; }
.sound-button.off .waves { display: none; }
.sound-button.off .cross { display: inline; }
.sound-button:hover { border-color: var(--primary); }
.sound-button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.sa { padding-bottom: 80px; }
.sa h2 { color: var(--dark); }
.sa-muted { color: var(--text); font-size: .9rem; }

/* ---------- 2. Start ---------- */
.sa-start { max-width: 640px; margin: 0 auto; text-align: center; }
.sa-back { margin: 6px 0 0; text-align: left; font-size: .85rem; }
.sa-back a { color: var(--primary); font-weight: 600; text-decoration: none; }
.sa-tagline { margin: 14px auto 22px; max-width: 520px; }
.sa-stats { display: flex; justify-content: center; gap: 14px; }
.sa-stats div { min-width: 130px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(74, 68, 88, .06); }
.sa-stats b { display: block; color: var(--dark); font-size: 1.8rem; line-height: 1.1; }
.sa-stats span { color: var(--text); font-size: .8rem; font-weight: 600; }
.sa-collected { margin: 16px 0 8px; color: var(--dark); font-weight: 700; }
.sa-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 30px; margin: 0 0 22px; }
.sa-strip img { width: 44px; height: 30px; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); animation: saPop .4s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.sa-strip img:nth-child(n) { animation-delay: calc(var(--d, 0) * 1s); }
.sa-play { display: block; margin: 0 auto 18px; padding: 18px 56px; border: 0; border-radius: 99px; background: linear-gradient(135deg, #e9a27f, #c9826a); color: #fff; font: inherit; font-size: 1.3rem; font-weight: 700; box-shadow: 0 12px 28px rgba(201, 130, 106, .4); cursor: pointer; animation: saBreathe 2.4s ease-in-out infinite; }
.sa-play:hover { transform: scale(1.04); }
@keyframes saBreathe { 50% { box-shadow: 0 14px 36px rgba(201, 130, 106, .6); transform: scale(1.03); } }
.sa-links { display: flex; justify-content: center; gap: 10px; }
.sa-reset { margin-top: 30px; }
.sa-reset .sa-link { color: #a49eab; font-size: .8rem; font-weight: 400; }
.sa-resetbox { max-width: 420px; margin: 10px auto; padding: 14px; border-radius: 14px; background: #fff3f0; }

/* ---------- 3. Buttons ---------- */
.sa-btn { padding: 11px 20px; border: 0; border-radius: 99px; background: var(--play); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sa-btn:hover { background: var(--play-hover); }
.sa-btn.light { background: #fff; color: var(--dark); box-shadow: inset 0 0 0 1px var(--line); }
.sa-btn.light:hover { background: var(--soft); }
.sa-btn.danger { background: #c4534a; }
.sa-link { padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.sa-two { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

/* ---------- 4. Playing ---------- */
.sa-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 10px 0 8px; font-size: .9rem; }
.sa-hud .sa-link { margin-right: auto; }
.sa-points { color: var(--dark); font-weight: 600; }
.sa-points b { font-size: 1.15rem; }
.sa-albumhud { padding: 4px 12px; border-radius: 99px; background: #fff; color: var(--dark); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.sa-streak { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 99px; background: #fff4e6; color: #b5523b; font-weight: 700; transition: transform .2s; }
.sa-streak[hidden] { display: none; }
.sa-streak span { font-weight: 600; font-size: .8rem; }
.sa-streak.hot1 i { animation: saFlame 1s ease-in-out infinite; display: inline-block; }
.sa-streak.hot2 { background: #ffe3c4; transform: scale(1.06); }
.sa-streak.hot2 i { animation: saFlame .6s ease-in-out infinite; display: inline-block; }
.sa-streak.hot3 { background: linear-gradient(90deg, #ffd27d, #ff9f6b, #ffd27d); background-size: 200% 100%; animation: saShine 1.6s linear infinite; transform: scale(1.12); }
.sa-streak.hot3 i { animation: saFlame .4s ease-in-out infinite; display: inline-block; }
.sa-streak.broke { animation: saBroke .6s ease; }
@keyframes saFlame { 50% { transform: scale(1.3) rotate(-8deg); } }
@keyframes saShine { to { background-position: -200% 0; } }
@keyframes saBroke { 30% { transform: scale(.8); opacity: .4; } }
.sa-progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 16px; }
.sa-progress i { display: block; height: 100%; width: 0; background: var(--learn-deep); transition: width .4s; }

.sa-flags, .sa-names { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 14px; }
.sa-flags { grid-template-columns: repeat(3, 1fr); max-width: 860px; }
.sa-flags.n4 { grid-template-columns: repeat(4, 1fr); max-width: 980px; }
.sa-flags li { position: relative; }
.sa-flags li, .sa-names li { animation: saIn .4s cubic-bezier(.3, 1.4, .5, 1) backwards; animation-delay: calc(var(--i) * 70ms); }
.sa-flags:not(.enter) li, .sa-names:not(.enter) li { animation: none; }
@keyframes saIn { from { opacity: 0; transform: translateY(14px) scale(.92); } }
.sa-flag { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .2s; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.sa-flag img { display: block; width: 100%; height: auto; aspect-ratio: 600 / 410; object-fit: cover; border-radius: 10px; }
.sa-flag:hover { transform: translateY(-3px); }
.sa-flags li.picked .sa-flag { box-shadow: 0 0 0 4px var(--primary), 0 8px 20px rgba(0, 0, 0, .2); transform: translateY(-3px); }
.sa-flags li.done .sa-flag { opacity: .3; cursor: default; transform: none; box-shadow: none; }
.sa-flags li.odd .sa-flag { opacity: .55; cursor: default; box-shadow: 0 0 0 3px var(--learn-deep); }
.sa-flags.waiting li:not(.done):not(.odd) .sa-flag { box-shadow: 0 0 0 3px var(--learn), 0 4px 14px rgba(0, 0, 0, .15); }
.sa-new { position: absolute; top: -8px; left: -8px; padding: 3px 8px; border-radius: 99px; background: #f5c518; color: #3d3747; font-size: .68rem; font-weight: 800; letter-spacing: .05em; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); animation: saNew 1.6s ease-in-out infinite; }
@keyframes saNew { 50% { transform: scale(1.12) rotate(-4deg); } }
.sa-odd { display: block; margin-top: 6px; color: var(--dark); font-size: .8rem; font-weight: 600; text-align: center; }
.sa-odd:empty { display: none; }
.sa-hint { min-height: 1.6em; margin: 18px 0; color: var(--dark); font-weight: 600; text-align: center; }

.sa-names { grid-template-columns: repeat(3, 1fr); max-width: 860px; }
.sa-names.n4 { grid-template-columns: repeat(4, 1fr); max-width: 980px; }
.sa-name { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 64px; padding: 12px 8px; border: 0; border-radius: 14px; background: #fff; color: var(--dark); font: inherit; font-weight: 600; line-height: 1.25; text-align: center; box-shadow: inset 0 0 0 1px var(--line), 0 3px 10px rgba(74, 68, 88, .06); cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .2s, background .2s; }
.sa-name:hover { transform: translateY(-2px); }
.sa-name img { display: none; width: 46px; height: auto; border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.sa-names li.picked .sa-name { box-shadow: inset 0 0 0 3px var(--primary); }
.sa-names.waiting li:not(.done):not(.odd) .sa-name { box-shadow: inset 0 0 0 2px var(--learn-deep); }
.sa-names li.done .sa-name { background: #eaf6ec; cursor: default; transform: none; }
.sa-names li.done .sa-name img { display: block; }
.sa-names li.odd .sa-name { opacity: .5; cursor: default; background: var(--soft); }
.sa-names li.odd .nm { text-decoration: line-through; }
.sa-name .sa-odd { margin: 0; font-size: .7rem; font-weight: 400; }
.sa-names li.pop .sa-name { animation: saPopGlow .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes saPopGlow { 0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(26, 158, 75, .55); } 50% { transform: scale(1.08); } 100% { transform: scale(1); box-shadow: 0 0 0 14px rgba(26, 158, 75, 0); } }
.shake { animation: saShake .4s; }
.sa-names li.shake .sa-name { background: #fdeceb; }
@keyframes saShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- 5. The challenge: another background, so it's clearly not bad luck ---------- */
body { transition: background-color .6s; }
body.sa-challenge { background: radial-gradient(circle at 50% 0%, #4a3f6b, #2c2640 70%); }
body.sa-challenge .top .home, body.sa-challenge .top h1, body.sa-challenge .sa-points, body.sa-challenge .sa-hint, body.sa-challenge .sa-hud .sa-link { color: #fff; }
body.sa-challenge .sa-flag { box-shadow: 0 0 0 2px rgba(247, 217, 139, .6), 0 8px 24px rgba(0, 0, 0, .4); }
body.sa-challenge .sa-progress { background: rgba(255, 255, 255, .15); }
.sa-chbanner { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 auto 16px; max-width: 560px; padding: 10px 18px; border-radius: 16px; background: linear-gradient(90deg, #f7d98b, #f4b740, #f7d98b); background-size: 200% 100%; animation: saShine 2s linear infinite; color: #3d3747; text-align: center; box-shadow: 0 8px 26px rgba(244, 183, 64, .45); }
.sa-chbanner[hidden] { display: none; }
.sa-chbanner strong { font-size: 1.05rem; }
.sa-chbanner small { font-size: .8rem; }

/* ---------- 6. Pause, goodbye, album, badges ---------- */
.sa-panel { max-width: 560px; margin: 26px auto 0; padding: 26px 22px; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 12px 34px rgba(74, 68, 88, .12); animation: saIn .45s cubic-bezier(.3, 1.3, .5, 1); }
.sa-panel h2 { margin: 0 0 8px; font-size: 1.6rem; }
.sa-big { margin: 6px 0; color: var(--dark); font-size: 1.3rem; font-weight: 700; }
.sa-panel .sa-strip { margin: 8px 0 12px; }
.sa-badgeline { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sa-badgeline li { padding: 6px 12px; border-radius: 99px; background: #fff4d6; color: var(--dark); font-weight: 600; font-size: .85rem; }
.sa-fact { margin: 18px 0 0; padding: 16px; border-radius: 18px; background: var(--soft); }
.sa-fact h3 { margin: 0 0 10px; color: var(--dark); font-size: 1rem; }
.sa-fact img { display: block; width: min(240px, 70%); height: auto; margin: 0 auto 8px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); animation: saFlip .7s ease backwards .2s; }
@keyframes saFlip { from { transform: perspective(600px) rotateY(80deg); opacity: 0; } }
.sa-fact strong { display: block; color: var(--dark); }
.sa-fact p { margin: 6px 0 0; }
#albumGrid h3 { margin: 22px 0 8px; color: var(--dark); font-size: 1rem; }
#albumGrid h3 small { color: #a49eab; font-weight: 600; }
.sa-album { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.sa-album li { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .68rem; line-height: 1.2; text-align: center; color: var(--dark); }
.sa-album .pic { display: flex; align-items: center; justify-content: center; width: 72px; height: 50px; border-radius: 5px; overflow: hidden; }
.sa-album img { width: 100%; height: 100%; object-fit: cover; }
.sa-album .got .pic { box-shadow: 0 3px 8px rgba(0, 0, 0, .2); }
.sa-album .seen .pic { opacity: .35; filter: grayscale(.8); }
.sa-album .empty .pic { background: repeating-linear-gradient(135deg, #f3ede9 0 6px, #ece4df 6px 12px); color: #c3b8b1; font-weight: 700; box-shadow: inset 0 0 0 1px #e3d9d3; }
.sa-badges { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sa-badges li { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: #f4f1f3; color: #a49eab; }
.sa-badges li.got { background: #fff; color: var(--dark); box-shadow: inset 0 0 0 1px var(--line), 0 4px 12px rgba(74, 68, 88, .08); }
.sa-badges .ic { grid-row: 1 / 3; font-size: 1.8rem; text-align: center; }
.sa-badges strong { font-size: .9rem; }
.sa-badges small { font-size: .75rem; }

/* the challenges */
.sa-btn.challenge { background: linear-gradient(90deg, #4a3f6b, #6a5a99); color: #f7d98b; box-shadow: 0 8px 20px rgba(74, 63, 107, .3); }
.sa-btn.challenge:hover { filter: brightness(1.1); }
#groupList h3 { margin: 24px 0 10px; color: var(--dark); font-size: 1rem; }
.sa-groups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sa-group { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: #fff; color: var(--dark); font: inherit; text-align: left; box-shadow: inset 0 0 0 1px var(--line), 0 4px 12px rgba(74, 68, 88, .06); cursor: pointer; transition: transform .15s; }
.sa-group:hover { transform: translateY(-2px); }
.sa-group .minis { display: flex; gap: 4px; margin-bottom: 4px; }
.sa-group .minis img { width: 34px; height: 23px; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.sa-group strong { font-size: .92rem; }
.sa-group small { color: var(--text); font-size: .75rem; }
.sa-group.done { box-shadow: inset 0 0 0 2px #7cc48c, 0 4px 12px rgba(74, 68, 88, .06); }
.sa-group.final { background: linear-gradient(135deg, #4a4458, #2f2a3a); color: #f7d98b; }
.sa-group.final small { color: #cfc3b3; }

/* ---------- 7. Praise, toasts, new flags ---------- */
.sa-praise { position: fixed; left: 50%; top: 42%; z-index: 70; pointer-events: none; color: #fff; font-weight: 800; letter-spacing: .02em; text-shadow: 0 4px 0 rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .3); opacity: 0; transform: translate(-50%, -50%) scale(.3); -webkit-text-stroke: 2px #c9826a; }
.sa-praise.show { animation: saPraise 1.3s cubic-bezier(.3, 1.5, .5, 1) forwards; }
.sa-praise.big1 { font-size: 2.6rem; }
.sa-praise.big2 { font-size: 3.2rem; -webkit-text-stroke-color: #e07b39; }
.sa-praise.big3 { font-size: 3.8rem; -webkit-text-stroke-color: #d9a441; }
.sa-praise.big4 { font-size: 4.3rem; -webkit-text-stroke-color: #b5523b; }
.sa-praise.big5 { font-size: 4.8rem; -webkit-text-stroke-color: #8a4fd0; }
@keyframes saPraise { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(3deg); } 40% { transform: translate(-50%, -50%) scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1.05); } }
body.glow::after { content: ''; position: fixed; inset: 0; z-index: 60; pointer-events: none; box-shadow: inset 0 0 120px rgba(247, 217, 139, .8); animation: saGlow 1.2s ease forwards; }
@keyframes saGlow { from { opacity: 1; } to { opacity: 0; } }
.sa-toasts { position: fixed; left: 50%; top: 14px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: 92vw; }
.sa-toast { padding: 10px 18px; border-radius: 99px; background: #3d3747; color: #fff; font-weight: 600; font-size: .9rem; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); animation: saToast .45s cubic-bezier(.3, 1.5, .5, 1); }
.sa-toast.badge { background: linear-gradient(90deg, #f7d98b, #f4b740); color: #3d3747; font-size: 1rem; }
.sa-toast.out { opacity: 0; transform: translateY(-10px); transition: opacity .4s, transform .4s; }
@keyframes saToast { from { opacity: 0; transform: translateY(-20px) scale(.8); } }
.sa-newflags { position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 20px; background: rgba(61, 55, 71, .55); color: #fff; text-align: center; cursor: pointer; }
.sa-newflags[hidden] { display: none; }
.sa-newflags strong { font-size: 1.5rem; text-shadow: 0 3px 12px rgba(0, 0, 0, .35); animation: saToast .5s cubic-bezier(.3, 1.5, .5, 1); }
.sa-newrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.sa-card { width: 150px; padding: 10px; border-radius: 14px; background: #fff; color: var(--dark); font-weight: 600; font-size: .85rem; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); animation: saCard .8s cubic-bezier(.3, 1.4, .5, 1) backwards; animation-delay: calc(.25s + var(--i) * .25s); }
.sa-card img { display: block; width: 100%; height: auto; margin-bottom: 6px; border-radius: 6px; }
@keyframes saCard { from { transform: perspective(700px) rotateY(100deg) translateY(30px) scale(.7); opacity: 0; } }

/* ---------- 8. Effects ---------- */
.sa-ghost { position: fixed; z-index: 50; pointer-events: none; border-radius: 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, .25); }
.sa-fly { position: fixed; z-index: 85; width: 48px; height: 33px; object-fit: cover; border-radius: 4px; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.sa-plus { position: fixed; z-index: 65; pointer-events: none; color: #1a9e4b; font-size: 1.3rem; font-weight: 800; text-shadow: 0 2px 6px rgba(255, 255, 255, .9); transform: translate(-50%, 0); animation: saPlus 1.1s ease-out forwards; }
.sa-plus.x2 { color: #f4b740; font-size: 1.6rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
@keyframes saPlus { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
.sa-confetti { position: fixed; z-index: 90; width: 9px; height: 14px; margin: -7px 0 0 -4px; pointer-events: none; box-shadow: 0 0 1px rgba(0, 0, 0, .3); }
.sa-spark { position: fixed; z-index: 86; pointer-events: none; color: #f4b740; font-size: 14px; }
.bump { animation: saBump .45s ease; display: inline-block; }
.sa-hint.bump, .sa-chbanner.bump { display: flex; }
.sa-hint.bump { display: block; }
@keyframes saBump { 40% { transform: scale(1.18); } }
@keyframes saPop { from { transform: scale(0); } }

/* ---------- 9. Phones ---------- */
@media (max-width: 640px) {
	.top { flex-wrap: wrap; row-gap: 8px; }
	.top .mask { order: 3; flex-basis: 100%; }
	.top .sound-button { margin-left: auto; }
	.top .lang { margin-left: 0; }
	.top h1 { font-size: 1.15rem; }
	.sa-stats div { min-width: 0; flex: 1; }
	.sa-play { padding: 16px 44px; font-size: 1.2rem; }
	.sa-flags { gap: 8px; }
	.sa-flags.n4 { grid-template-columns: repeat(2, 1fr); max-width: 360px; }
	.sa-names, .sa-names.n4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.sa-names.n3 li:last-child { grid-column: 1 / -1; }
	.sa-name { min-height: 54px; font-size: .88rem; }
	.sa-hint { margin: 12px 0; font-size: .9rem; }
	.sa-hud { font-size: .82rem; gap: 6px 10px; }
	.sa-praise.big1 { font-size: 2rem; } .sa-praise.big2 { font-size: 2.4rem; } .sa-praise.big3 { font-size: 2.8rem; } .sa-praise.big4, .sa-praise.big5 { font-size: 3.1rem; }
	.sa-card { width: 110px; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
	.sa-play, .sa-new, .sa-streak i, .sa-streak.hot3, .sa-chbanner, .sa-flags li, .sa-names li, .sa-card, .sa-fact img, .shake, .bump, .sa-names li.pop .sa-name { animation: none !important; }
	body.glow::after { display: none; }
}

/* ⭐ the bonus pack (js/samle.js, 5b): a warm gold page – new flags ahead of time, double points */
/* the gold bonus page: on a fixed layer behind everything (cheaper than background-attachment: fixed, which makes scrolling heavy on phones) */
body.sa-bonus::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 0%, #fff3cf, #fbe0a6 75%); pointer-events: none; }
body.sa-bonus .sa-flag { box-shadow: 0 0 0 3px #f4b740, 0 8px 22px rgba(244, 183, 64, .35); }

/* the heat meter (js/samle.js, 8): ×1–×4 and a small bar towards the next step */
.sa-heat { display: inline-block; width: 34px; height: 6px; border-radius: 3px; background: rgba(181, 82, 59, .18); overflow: hidden; vertical-align: middle; }
.sa-streak .sa-heat { animation: none !important; }
.sa-streak .sa-heat i { display: block; }   /* (the flame rule above makes every i inline – that hid the bar) */
.sa-heat i { display: block; height: 100%; background: currentColor; border-radius: 3px; transition: width .4s ease; animation: none !important; }
/* the weekly goal and the best run on the start screen */
.sa-week { margin: 4px 0 0; font-weight: 600; color: #6a4fb3; }
.sa-bestrun { margin: 2px 0 10px; font-size: .88rem; color: #8a7f92; min-height: 1.2em; }

/* ---------- Celebrations (js/samle.js, 10b) ---------- */
.sa-party { position: relative; overflow: hidden; }
.sa-party h2 { font-size: 2rem; margin-top: 4px; }
.sa-party-art { display: flex; justify-content: center; align-items: center; min-height: 120px; }
.sa-party-icon { font-size: 5rem; line-height: 1; animation: saPartyPop .9s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes saPartyPop { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.sa-party-more { list-style: none; margin: 4px 0 16px; padding: 0; font-weight: 600; color: #6a4fb3; }
.sa-party-more li { margin: 4px 0; }
.sa-party.medium, .sa-party.duck, .sa-party.world { background: radial-gradient(circle at 50% 20%, #fffbe9, #fff 70%); }
/* the bath duck: turning round, bobbing, with bubbles */
.sa-duck { width: 210px; height: 190px; animation: saDuckIn .8s cubic-bezier(.3, 1.5, .5, 1) both; perspective: 600px; }
.sa-duck svg { width: 100%; height: 100%; animation: saDuckSpin 3.2s linear infinite, saDuckBob 1.6s ease-in-out infinite alternate; transform-style: preserve-3d; }
@keyframes saDuckIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes saDuckSpin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes saDuckBob { from { translate: 0 -4px; } to { translate: 0 6px; } }
.sa-party.duck .sa-party-art { min-height: 200px; position: relative; }
.sa-bubbles { position: absolute; inset: 0; pointer-events: none; }
.sa-bubbles i { position: absolute; bottom: 0; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(120, 180, 230, .7); background: rgba(200, 230, 255, .35); animation: saBubble 3s ease-in infinite; }
.sa-bubbles i:nth-child(1) { left: 14%; animation-delay: 0s; }
.sa-bubbles i:nth-child(2) { left: 26%; width: 10px; height: 10px; animation-delay: .8s; }
.sa-bubbles i:nth-child(3) { left: 72%; animation-delay: .4s; }
.sa-bubbles i:nth-child(4) { left: 82%; width: 12px; height: 12px; animation-delay: 1.4s; }
.sa-bubbles i:nth-child(5) { left: 40%; width: 8px; height: 8px; animation-delay: 2s; }
.sa-bubbles i:nth-child(6) { left: 62%; width: 20px; height: 20px; animation-delay: 1.1s; }
@keyframes saBubble { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-190px) scale(1.1); opacity: 0; } }
.sa-party.duck h2 { color: #e0a800; text-shadow: 0 2px 0 #fff3b0; }
.sa-party.duck #partyText { font-size: 1.6rem; font-weight: 700; color: #3d3747; margin: 6px 0 10px; }
.sa-duck { position: relative; width: 230px; height: 210px; }
/* the duck's shadow: on the "floor", it stays still while the duck turns */
.sa-duck::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 2px; height: 14px; border-radius: 50%; background: rgba(0, 0, 0, .1); animation: saDuckShadow 1.6s ease-in-out infinite alternate; }
@keyframes saDuckShadow { from { transform: scaleX(1.05); } to { transform: scaleX(.92); } }
/* "PATO!" – a speech bubble that pops up after the duck's first full turn (3.2 s) */
.sa-pato { position: absolute; top: 4px; left: calc(50% + 58px); padding: 6px 14px; border-radius: 16px; background: #fff; color: #e35a12; font-weight: 800; font-size: 1.4rem; letter-spacing: .04em; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); transform-origin: 0 100%; animation: saPato .6s cubic-bezier(.3, 1.6, .5, 1) 3.2s both; }
.sa-pato::after { content: ''; position: absolute; left: 10px; bottom: -9px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; border-left: 0; }
@keyframes saPato { from { opacity: 0; transform: scale(0) rotate(-20deg); } to { opacity: 1; transform: scale(1) rotate(-6deg); } }
@media (max-width: 430px) { .sa-pato { left: auto; right: 8px; font-size: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .sa-pato { animation: none; transform: rotate(-6deg); } }
/* all 195: every flag pops up */
.sa-world { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 3px; width: 100%; }
.sa-world li { animation: saPartyPop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.sa-world img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
	.sa-party-icon, .sa-duck, .sa-duck svg, .sa-world li { animation: none; }
	.sa-bubbles { display: none; }
}

/* ---------- Keeping the play screen still (26 Nov 2026) ----------
   Nothing on the play screen should change height in the middle of a round,
   so the flags and names never jump and never slide below the screen's edge. */
/* the top bar stays on one line: "Ferdig for nå" may shorten (…) on a narrow phone */
.sa-hud { flex-wrap: nowrap; }
.sa-hud > * { flex: none; white-space: nowrap; }
.sa-hud .sa-link { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 430px) {
	.sa-hud { column-gap: 10px; font-size: .85rem; }
	.sa-streak, .sa-albumhud { padding: 4px 9px; }
}
@media (max-width: 400px) { .sa-points > span { display: none; } }   /* the word "poeng" – the number stays */
/* the gold banner (challenge / bonus pack): compact – the explanation at most two lines (it only appears at the start of a round) */
.sa-chbanner { margin-bottom: 10px; padding: 7px 14px; }
.sa-chbanner strong { line-height: 1.25; }
.sa-chbanner small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
@media (max-width: 430px) {
	.sa-chbanner strong { font-size: .95rem; }
	.sa-chbanner small { font-size: .74rem; }
}
/* a matched name: its little flag appears as a stamp on the button's top edge – the button keeps its height */
.sa-name { position: relative; }
.sa-names li.done .sa-name img { position: absolute; top: -11px; left: 50%; width: 34px; transform: translateX(-50%); }
