/* glosor-ny.css — Glosor as a study screen, the new Framsteg tab, the flashcards, and a
   six-tab bar (2026-09-23). Loaded after app.css (index.html). */

/* ---- the tab bar: six tabs, each as wide as its label ---- */
nav { gap: .1em; padding-left: .25em; padding-right: .25em; }
nav button { flex: 1 1 auto; min-width: 0; padding: .4em .3em; white-space: nowrap; }
@media (max-width: 400px) { nav button { padding: .4em .15em; font-size: .64rem; min-width: 0; } nav .ico { font-size: 1.05rem; } }

/* ---- Glosor: the study bar ---- */
.studera { display: grid; gap: .6em; margin: .4em 0 .8em; }
.studprim { display: flex; align-items: center; gap: .8em; width: 100%; min-height: 62px; padding: 0 1em; border-radius: 14px; text-align: left;
  background: var(--blue); color: var(--on-blue); box-shadow: 0 4px 12px rgba(116, 63, 142,.25); }
.studprim .st { flex: 1; min-width: 0; display: grid; } .studprim b { font-size: 1.08rem; } .studprim small { font-size: .8rem; opacity: .88; }
.studprim svg { flex: none; }
.studrad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5em; }
.studtile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25em; min-height: 64px; padding: .5em .3em; border-radius: 12px;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.studtile span { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.studtile.on { background: var(--blue-soft); color: var(--blue-ink, var(--blue)); border-color: var(--blue); }

.glosorfilter { display: grid; gap: .5em; margin-bottom: .4em; }
.filterchips { display: flex; gap: .4em; overflow-x: auto; scrollbar-width: none; }
.filterchips::-webkit-scrollbar { display: none; }
.filterchips button { flex: none; height: 34px; padding: 0 .85em; border-radius: 999px; font-size: .82rem; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); white-space: nowrap; }
.filterchips button span { color: var(--granite); margin-left: .2em; }
.filterchips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.filterchips button.on span { color: inherit; opacity: .75; }
.sokrad { display: flex; gap: .5em; align-items: center; }
.sokrad .sok { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5em; height: 40px; padding: 0 .75em; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--granite); }
.sokrad .sok input { border: 0; padding: 0; background: transparent; height: 100%; min-width: 0; }
.sokrad .sok input:focus-visible { outline: none; } .sokrad .sok:focus-within { border-color: var(--blue); }
.sokrad .sortval { display: flex; align-items: center; gap: .2em; flex: none; }
.sokrad .sortval select { width: auto; max-width: 8.5em; height: 40px; padding: 0 .4em; font-size: .85rem; }
.sokrad .laggtill { flex: none; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 10px; }
.glosorantal { text-align: center; margin: .6em 0 1.2em; }

/* Dölj betydelse: the list as a self-test — tap a row to see its meaning and example */
.wordlist.dolj li { cursor: pointer; }
.wordlist.dolj li:not(.visa) .andra, .wordlist.dolj li:not(.visa) .ex { display: none; }
.wordlist.dolj li:not(.visa) .en { font-size: 0; }
.wordlist.dolj li:not(.visa) .en > * { display: none; }
.wordlist.dolj li:not(.visa) .en::before { content: "Tryck för att visa"; display: inline-block; white-space: nowrap; padding: .2em .7em; border-radius: 8px; font-size: .78rem; color: var(--granite);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--line) 55%, transparent) 0 6px, color-mix(in srgb, var(--line) 85%, transparent) 6px 12px); }

/* ---- Framsteg ---- */
.framrubrik { margin: .2em 0 .4em; }
#framstegView .petscene { margin-top: .2em; }
.fstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5em; margin: .8em 0 .6em; }
.fstat { display: flex; flex-direction: column; align-items: center; gap: .1em; padding: .8em .3em; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); text-align: center; }
.fstat .stat { width: 64px; height: 64px; } .fstat .stat b { font-size: 1.2rem; } /* the number shrinks with its digits so it stays inside the symbol */
.fstat .stat b.n3 { font-size: .98rem; } .fstat .stat b.n4 { font-size: .8rem; letter-spacing: -.02em; } .fstat small { font-size: .72rem; color: var(--granite); white-space: nowrap; margin-top: .25em; }
.fkort { margin: 0 0 .6em; padding: .8em .9em; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); display: grid; gap: .5em; }
.fkort h2 { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; margin: 0; white-space: nowrap; }
.fkhead { display: flex; justify-content: space-between; align-items: baseline; }
.fniva { display: grid; grid-template-columns: 30px 4.2em minmax(0, 1fr) 2em; align-items: center; gap: .5em; }
.fniva .fdjur svg { display: block; width: 30px; height: 26px; }
.fniva .fnamn { font-size: .78rem; color: var(--granite); white-space: nowrap; }
.fniva .fstapel { height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--line) 50%, transparent); overflow: hidden; }
.fniva .fstapel i { display: block; height: 100%; border-radius: 6px; min-width: 3px; }
.fniva b { text-align: right; font-size: .88rem; }
.fvecka { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.fvecka p { margin: .15em 0 0; }
.fvdagar { display: flex; gap: 4px; height: 40px; align-items: flex-end; }
.fvdagar span { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; height: 100%; width: 12px; }
.fvdagar i { display: block; width: 10px; border-radius: 3px; background: var(--ok); }
.fvdagar small { font-size: .58rem; color: var(--granite); }
.fvdagar .idag small { color: var(--ink); font-weight: 700; }

/* ---- the flashcards (js/kort.js) ---- */
body.kort-on { overflow: hidden; }
.kortark { position: fixed; inset: 0; z-index: 90; background: var(--paper); display: flex; flex-direction: column; gap: .6em; padding: .8em 1em calc(1em + env(safe-area-inset-bottom)); overflow-y: auto; max-width: 560px; margin: 0 auto; }
.khead { display: flex; align-items: center; gap: .7em; }
.kstang { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: transparent; color: var(--granite); font-size: 1.4rem; }
.kprog { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .kprog i { display: block; height: 100%; background: var(--blue); transition: width .25s; }
.kantal { font-size: .82rem; color: var(--granite); white-space: nowrap; }
.kriktn { display: flex; justify-content: center; gap: .4em; }
.kriktn button { padding: .3em .8em; border-radius: 999px; font-size: .78rem; background: transparent; color: var(--granite); border: 1px solid var(--line); white-space: nowrap; }
.kriktn button.on { background: var(--blue-soft); color: var(--blue-ink, var(--blue)); border-color: transparent; font-weight: 600; }
.kbunt { position: relative; margin: .6em .4em 0; min-height: 220px; display: grid; }
.kbunt > i { position: absolute; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 80%, var(--line)); }
.kbunt > i:nth-child(1) { inset: 14px -6px -8px 6px; } .kbunt > i:nth-child(2) { inset: 7px -3px -4px 3px; background: color-mix(in srgb, var(--paper) 92%, var(--line)); }
.kkort { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; min-height: 220px; padding: 1.2em 1em; border-radius: 18px; text-align: center;
  background: #fff; color: #1c1d21; border: 0; box-shadow: 0 8px 24px rgba(28,29,33,.12); touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; }
.kkort.vand .klyss:last-child { align-self: flex-start; margin-top: .2em; }
/* Swipe feedback (Linh, 2026-09-23): edge tabs say what each direction does; the card tints as it moves. */
.kkort { transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease; will-change: transform; touch-action: pan-y; }
.kkort.drar { transition: none; }
.kkort.vand::before, .kkort.vand::after { position: absolute; top: 50%; transform: translateY(-50%); font: 700 .62rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; writing-mode: vertical-rl; padding: .8em .35em; border-radius: 6px; opacity: .55; pointer-events: none; }
.kkort.vand::before { content: "‹ Öva igen"; left: 0; border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); transform: translateY(-50%) rotate(180deg); }
.kkort.vand::after { content: "Kunde det ›"; right: 0; border-radius: 6px 0 0 6px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.kkort.dra-v { box-shadow: 0 8px 24px rgba(28,29,33,.12), inset 0 0 0 3px var(--bad); background: color-mix(in srgb, var(--bad) 9%, #fff); }
.kkort.dra-h { box-shadow: 0 8px 24px rgba(28,29,33,.12), inset 0 0 0 3px var(--ok); background: color-mix(in srgb, var(--ok) 11%, #fff); }
.kkort.dra-v::before, .kkort.dra-h::after { opacity: 1; }
@media (prefers-color-scheme: dark) { .kkort.dra-v { background: color-mix(in srgb, var(--bad) 18%, #1f2329); } .kkort.dra-h { background: color-mix(in srgb, var(--ok) 20%, #1f2329); } }
@media (prefers-reduced-motion: reduce) { .kkort { transition: none; } }
@media (prefers-color-scheme: dark) { .kkort { background: #1f2329; color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.45); } }
.kkort.vand { align-items: stretch; text-align: left; justify-content: flex-start; }
.kmark svg { display: block; }
.kord { font-family: var(--serif); font-size: clamp(1.8rem, 8vw, 2.4rem); line-height: 1.1; overflow-wrap: anywhere; }
.kord.liten { font-size: 1.4rem; display: flex; align-items: center; gap: .4em; }
.kbet { font-size: 1.02rem; line-height: 1.45; text-wrap: pretty; }
.kkort:not(.vand) .kbet { font-family: var(--serif); font-size: clamp(1.15rem, 5vw, 1.4rem); line-height: 1.38; }
.ktyp { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--granite); }
.kex { font-family: var(--serif); font-style: italic; font-size: .95rem; line-height: 1.45; color: var(--granite); padding-top: .5em; border-top: 1px dashed var(--line); }
.kex mark { background: color-mix(in srgb, var(--ok) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 .15em; }
.kexen { display: block; font-family: var(--sans); font-style: normal; font-size: .82rem; margin-top: .2em; }
.klyss { display: inline-flex; align-items: center; gap: .35em; padding: .3em .7em; border-radius: 999px; background: var(--blue-soft); color: var(--blue-ink, var(--blue)); font-size: .85rem; }
.klyss.ikon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.ktips, .kfot { text-align: center; font-size: .8rem; color: var(--granite); margin: .2em 0; min-height: 1.2em; }
.kval { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; margin-top: auto; padding-top: .9em; width: 100%; } /* the card's own footer (Linh, 2026-09-23) */
.kkort.vand { padding-left: 2.1em; padding-right: 2.1em; padding-bottom: .9em; } /* room for the edge tabs beside the text */
.kljud { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink, var(--blue)); flex: none; }
.kljud.av { background: transparent; color: var(--granite); position: relative; }
.kljud.av::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; margin-top: -1px; background: var(--bad); transform: rotate(-40deg); border-radius: 2px; }
.kval button { min-height: 46px; border-radius: 12px; font-weight: 700; font-size: .88rem; white-space: nowrap; padding: 0 .3em; }
.kigen { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border: 2px solid var(--bad); }
.kkunde { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border: 2px solid var(--ok); }
.kslut { display: grid; gap: .8em; text-align: center; padding-top: 1em; }
.kstor { font-family: var(--serif); font-size: 1.6rem; }
.kslut p { margin: 0; }
.kprickar { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.kprickar i { width: 14px; height: 14px; border-radius: 50%; } .kprickar i.ok { background: color-mix(in srgb, var(--ok) 55%, #fff); } .kprickar i.igen { background: color-mix(in srgb, var(--bad) 45%, #fff); }
.klista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; }
.klista li { display: flex; justify-content: space-between; padding: .6em .8em; } .klista li + li { border-top: 1px solid var(--line); }
.klista b { font-family: var(--serif); font-weight: 600; } .klista span { font-size: .8rem; color: var(--bad); }
.kprim { min-height: 52px; border-radius: 14px; font-weight: 700; }
.ksek { min-height: 52px; border-radius: 14px; font-weight: 700; background: transparent; color: var(--blue-ink, var(--blue)); border: 1.5px solid var(--blue); }
@media (prefers-reduced-motion: reduce) { .kprog i { transition: none; } }

/* ---- the daily package on Framsteg (js/dagspaket.js, 2026-09-24): seven days, day 7 a gold box ---- */
.fdagens { display: grid; gap: 10px; }
.fdagens > p { margin: 0; line-height: 1.4; }
.dcykel { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dcykel li { aspect-ratio: 1; max-width: 44px; justify-self: center; width: 100%; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--granite); background: var(--sunk, var(--blue-soft)); border: 2px solid transparent; box-sizing: border-box; }
.dcykel li.klar { background: var(--blue); color: var(--on-blue); }
.dcykel li.nu { border-color: var(--blue); color: var(--blue-ink, var(--blue)); background: var(--card, var(--paper)); }
.dcykel li.sallsynt { background: var(--gold-soft, #f8efd4); color: var(--gold, #b8860b); border-color: var(--gold, #b8860b); }
.dcykel li.sallsynt.klar { background: var(--gold, #b8860b); color: #fff; }
.dcykel li.sallsynt.nu { box-shadow: 0 0 0 3px var(--gold-soft, #f8efd4); }
.fdagens #dagensPaket .fbkort { border: 0; background: none; padding: 6px 0 0; }
/* the tab's dot while today's package waits */
nav button.harpaket { position: relative; }
nav button.harpaket::after { content: ""; position: absolute; top: 6px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--gold, #b8860b); border: 2px solid var(--paper); }
/* the notice after the day's first session */
.dnotis { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; width: min(420px, calc(100% - 32px)); box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card, var(--paper)); border: 1.5px solid var(--gold, #b8860b); box-shadow: 0 6px 22px rgba(0,0,0,.18); font-size: .88rem; animation: dnotisIn .25s ease-out; }
.dnotis .dikon { color: var(--gold, #b8860b); display: grid; }
.dnotis > span:nth-child(2) { flex: 1; }
.dnotis button { flex: none; padding: 7px 12px; border-radius: 10px; font-size: .84rem; }
@keyframes dnotisIn { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .dnotis { animation: none; } }

/* The package card lights up when the notice brought you here (js/dagspaket.js, 2026-10-04) */
.fdagens.dpglim { animation: dpglim 2.4s ease-out; }
@keyframes dpglim { 0% { box-shadow: 0 0 0 0 rgba(242,193,78,.9); } 40% { box-shadow: 0 0 0 8px rgba(242,193,78,.45); } 100% { box-shadow: 0 0 0 0 rgba(242,193,78,0); } }
@media (prefers-reduced-motion: reduce) { .fdagens.dpglim { animation: none; outline: 2px solid #F2C14E; } }
