/* HEM-LAS (Linh, 2026-10-31; design: "Hem och Läs - förslag" in the Claude Design project, docs/design/hem-las-brief.md).
   Loaded after app.css, las-rader.css and idag.css, so it only overrides. Light and dark use the existing tokens. */

/* ---- 1 · The tab bar: five tabs, Hem raised in the middle -------------------------------------------------- */
nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 4px; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
@media (min-width: 560px) { nav { grid-template-columns: repeat(5, minmax(0, 112px)); justify-content: center; } }
nav button { position: relative; min-width: 0; padding: 6px 4px; border-radius: 10px; font-size: 12px; font-weight: 500; }
nav .ico { font-size: 19.5px; line-height: 1.1; }
/* the open tab: the lilac pill (as today), a short purple bar on the top edge and a bold purple label */
nav button.on { font-weight: 700; color: var(--blue-ink, var(--blue)); background: var(--blue-soft); }
nav button.on::before { content: ""; position: absolute; top: -7px; left: 50%; width: 28px; height: 4px; margin-left: -14px; border-radius: 0 0 4px 4px; background: var(--blue); }
/* Hem: a raised circle, white with a grey outline when another tab is open, purple when Hem is open */
nav button.hem, nav button.hem.on { padding-top: 0; background: none; }
nav button.hem.on::before { display: none; }
nav button.hem .ico { box-sizing: border-box; width: 54px; height: 54px; margin: -26px auto 2px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: var(--card, var(--paper)); border: 1.5px solid var(--line); box-shadow: 0 0 0 4px var(--paper), 0 2px 6px rgba(0, 0, 0, .08); }
nav button.hem.on .ico { background: var(--blue); border-color: var(--blue); color: var(--on-blue); box-shadow: 0 0 0 4px var(--paper), 0 6px 14px rgba(116, 63, 142, .32); }
@media (max-width: 400px) { nav button { padding: 6px 2px; font-size: 11.5px; } }

/* ---- 2 · Hem: the next-step card shows the episode's cover and a taller button ----------------------------- */
.dvnasta.harbild { padding-top: 0; overflow: hidden; box-shadow: 0 14px 28px -14px rgba(116, 63, 142, .7); }
.dvnasta .dvnbild { position: relative; height: 150px; margin: 0 -16px 6px; background: var(--blue-soft); }
.dvnasta .dvnbild > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.dvnasta .dvnbild::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--blue)); }
@media (min-width: 560px) { .dvnasta .dvnbild { height: auto; aspect-ratio: 380 / 146; max-height: 260px; } } /* HEM-HERO-BRED (Linh, 2026-11-03): at 150 px a laptop's 806 px band showed a sliver; the band keeps the drawing's shape, up to 260 px */
.dvnasta.harbild .dvntitel { font-size: 34px; }
/* round 4 (Linh): the series and season over the name, and the name hand-written (js/serienamn.js) */
.dvnasta .dvnserie { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.dvnasta .dvntitel.ls-hand { font-family: "Caveat namn", var(--serif); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: 0; overflow-wrap: normal; }
.dvnasta .dvntitel.ls-hand2 { font-family: "Patrick Hand", var(--serif); font-weight: 400; letter-spacing: 0; font-size: 36px; line-height: 1.05; overflow-wrap: normal; } /* HAND-VI: Patrick Hand 400 is as wide as Caveat 700 but 27 % taller in the small letters, so each size is about 0.9 of Caveat's */
.dvnasta .dvncta { min-height: 60px; font-size: 19px; border-radius: 14px; }

/* ---- 4 · Läs: rules, Biblioteket, rows ------------------------------------------------------------------------ */
.ls-avdelare { margin-top: 6px; padding-top: 18px; border-top: 8px solid var(--sunk); }
.ls-avdelare > .ls-rader { padding: 0 0 6px; }
.ls-bibhead { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 8px solid var(--sunk); }
.ls-bibhead h2 { margin: 0; padding: 0 16px; font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.15; }
.ls-typchips { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.ls-typchips::-webkit-scrollbar { display: none; }
.ls-typchips .ls-chip { flex: none; }
.ls-rad > h2 { font-size: 26px; font-weight: 700; line-height: 1.15; }
.ls-rad > .ls-radsub { margin: -6px 0 0; padding: 0 16px; font-size: 14px; color: var(--granite); }

/* one card size in every row: today's poster, shorter (124 x 157, was 236) */
.ls-rader .ls-kort.ls-affisch, .ls-rader .ls-kort.ls-serie, .ls-rader .ls-kort.ls-sitkort { width: 124px; }
.ls-rader .ls-kort > .ls-art { min-height: 157px; height: 157px; }
.ls-rader .ls-alla, .ls-rader .ls-nytile, .ls-rader .ls-alla.h140, .ls-rader .ls-alla.h112, .ls-rader .ls-alla.h180 { height: 157px; border-radius: 14px !important; }
/* the text on the band, smaller */
.ls-band { padding: 20px 9px 9px; gap: 4px; }
.ls-band .ls-titel, .ls-affisch .ls-band .ls-titel, .ls-sitkort .ls-band .ls-titel, .ls-serie .ls-band .ls-titel { font-size: 17px; line-height: 1.15; }
/* round 3 (Linh): the name first and biggest; a card's title in the hand face once it has come (js/library.js handKlass) */
.ls-band .ls-titel.ls-hand { font-family: "Caveat namn", var(--serif); font-size: 23px; font-weight: 700; line-height: 1; letter-spacing: 0; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.ls-grid3 .ls-band .ls-titel.ls-hand { font-size: 20px; } /* a grid's card is narrower than a row's: "Myndigheter" stays one word */
.ls-band .ls-titel.ls-hand2 { font-family: "Patrick Hand", var(--serif); font-weight: 400; letter-spacing: 0; font-size: 21px; line-height: 1.05; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.ls-grid3 .ls-band .ls-titel.ls-hand2 { font-size: 18px; }
.ls-band .ls-titel + .ls-kicker { margin-top: 1px; }
/* done/total at the end of a bar */
.ls-xy { flex: none; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.ls-band .ls-kicker { font-size: 10.5px; }
.ls-band .ls-meta { font-size: 12px; gap: 6px; }
.ls-band .ls-steg, .ls-band .ls-tagg { font-size: 11.5px; padding: 0 5px; border-radius: 5px; }
/* in a row the poster shows no task line and no series status line; both stay on the pages that have room. Hidden from sight only: a screen reader still hears them */
.ls-rader .ls-sitkort .ls-uppg, .ls-grid3 .ls-sitkort .ls-uppg, .ls-rader .ls-serie .ls-rad2, .ls-grid3 .ls-serie .ls-rad2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* progress: a bar on the band instead of 3/10 or the Lyssnad mark */
.ls-bar { flex: 1; min-width: 24px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .32); overflow: hidden; }
.ls-bar > i { display: block; height: 100%; border-radius: 3px; background: #fff; }
/* your level first, then this divider, then the other levels */
.ls-andra { flex: none; align-self: stretch; width: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ls-andra::before, .ls-andra::after { content: ""; flex: 1; width: 1.5px; background: var(--line); }
.ls-andra > span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--granite); }

/* ---- 4b, 5, 6 · one type: a grid of three ------------------------------------------------------------------- */
.ls-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 9px; padding: 0 16px; }
@media (min-width: 560px) { .ls-grid3 { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); } }
.ls-grid3 > .ls-kort { width: auto; min-width: 0; }
.ls-grid3 > .ls-kort > .ls-art { height: auto; min-height: 0; aspect-ratio: 124 / 157; }
.ls-grid3 > .ls-nytile { width: auto; height: auto; aspect-ratio: 124 / 157; }
/* Din nivå and Andra nivåer: headings the size of a row's heading on Läs (round 2), the count small beside them */
.ls-gridrub { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 16px 10px; font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.ls-gridrub b { font: 400 14px var(--sans); color: var(--granite); }
.ls-grid3 > .ls-alla { width: auto; height: auto !important; min-height: 0; aspect-ratio: 124 / 157; border-radius: 14px !important; }
/* a chip's grid on Läs itself (round 2): at most 10 tiles, the last Se fler */
.ls-bib { margin-top: 14px; padding-bottom: 8px; }
.ls-bib > .ls-gridrub:first-child { margin-top: 4px; }
/* Vardagssituationer: the areas as one row of chips above Filter (screen 5); the 2-column cards there, shorter */
/* (.ls-omrchips, not .ls-omraden: that class is already the wrapper of the area sections in las-rader.css) */
.ls-omrchips { display: flex; gap: 8px; margin: 12px 0 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.ls-omrchips::-webkit-scrollbar { display: none; }
.ls-omrchips .ls-chip { flex: none; }
.ls-grid2 .ls-sitkort .ls-art { min-height: 160px; }
.ls-grid2 .ls-sitkort .ls-band .ls-titel { font-size: 16.5px; font-weight: 600; }
.ls-grid2 .ls-sitkort .ls-uppg { font-size: 12.5px; line-height: 1.3; }
/* Dina egna: the type as Biblioteket's chips (round 2) */
.ls-egnatyp { margin-top: 12px; }
/* Vardagssituationer: one row per area, the area's page a grid */
.ls-sitrader { margin-top: 6px; }
/* the saga page (round 2): Delar bigger; a season card says Del n and its story bigger than what it holds, its progress a bar */
.ls-saga > .ls-rad > h2 { font-size: 26px; font-weight: 700; }
.ls-sasongkort .ls-band .ls-sasnamn { font: 700 18px/1.2 var(--sans); color: #fff; overflow-wrap: anywhere; }
.ls-sasongkort .ls-haller { font-size: 12.5px; line-height: 1.3; opacity: .9; }
.ls-bar.ljus { background: var(--sunk); }
.ls-bar.ljus > i { background: var(--blue); }
.ls-berprog .ls-bar { flex: none; width: 56px; }
/* Berättelser's Lista: the drawn picture as the thumb (round 3) */
.ncover.ls-ntumme { position: relative; width: 3.6em; height: 3.6em; border-radius: 10px; background: linear-gradient(150deg, hsl(var(--h, 210) 55% 86%), hsl(var(--h2, 250) 55% 74%)); }
@media (prefers-color-scheme: dark) { .ncover.ls-ntumme { background: linear-gradient(150deg, hsl(var(--h, 210) 30% 24%), hsl(var(--h2, 250) 30% 33%)); } }
.novels.list .ncard .ntitle { font-size: 1.15rem; }
/* a row drags with the mouse (round 3); its scrollbar is not drawn */
.ls-spar { scrollbar-width: none; }
.ls-spar::-webkit-scrollbar { display: none; }
@media (pointer: fine) { .ls-spar { cursor: grab; } .ls-spar.drar { cursor: grabbing; user-select: none; } }
/* the reader: a saga story's series and season over the chapter's kicker */
.kapitel .kkick.kserie { font-weight: 700; color: var(--blue-ink, var(--blue)); }

/* ---- Back: one large arrow, no text, in the text colour, everywhere ---------------------------------------------- */
.ls-tillbaka { width: 48px; height: 48px; min-height: 48px; justify-content: center; padding: 0 !important; margin-inline-start: -6px; color: var(--ink) !important; }
.ls-tillbaka > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* the visible "Läs" goes; the button keeps its aria-label */
.ls-tillbaka svg, .tillbakapil svg { width: 30px; height: 30px; }
.tillbakapil { width: 48px; height: 48px; display: inline-grid; place-items: center; padding: 0 !important; border: 0 !important; background: none !important; color: var(--ink) !important; }
#spelView .spelbar .tillbakapil { color: var(--ljus) !important; } /* Ordskär's dark sky keeps its own light ink */

/* ---- 3 · Öva: the Glosor card ------------------------------------------------------------------------------------ */
.lekpic.glosor { position: relative; height: 96px; overflow: hidden; background: linear-gradient(135deg, var(--blue-soft), var(--blue-line, #dccbe3)); }
.lekpic.glosor .gord { position: absolute; padding: 10px 16px; border-radius: 10px; background: var(--card, #fff); color: var(--ink); font: 500 17px var(--serif); box-shadow: 0 3px 8px rgba(80, 40, 100, .18); white-space: nowrap; }
.lekpic.glosor .gord:nth-child(1) { left: 7%; top: 22px; transform: rotate(-7deg); }
.lekpic.glosor .gord:nth-child(2) { left: 36%; top: 34px; transform: rotate(3deg); }
.lekpic.glosor .gord:nth-child(3) { right: 6%; top: 18px; transform: rotate(8deg); background: var(--blue); color: var(--on-blue); }

/* Dina egna in Lista: + Ny over the list */
.ls-egnany { padding: 12px 16px 0; }
.ls-egnany .ls-nytile { width: 100%; height: 56px; flex-direction: row; }
.ls-typchips + .libtools, .ls-typchips + .ls-ingress { margin-top: 12px; }

/* round 4: the season page's scenes have bigger titles; a story row's and a season card's name are hand-written once the face has come */
.ls-grid2 .ls-sitkort .ls-band .ls-titel { font-size: 19px; }
.ls-grid2 .ls-sitkort .ls-band .ls-titel.ls-hand { font-size: 26px; line-height: 1; }
.ls-grid2 .ls-sitkort .ls-band .ls-titel.ls-hand2 { font-size: 23px; line-height: 1.05; }
.ls-berrad .ls-titel.ls-hand { font-family: "Caveat namn", var(--serif); font-size: 26px; font-weight: 700; line-height: 1.05; letter-spacing: 0; }
.ls-berrad .ls-titel.ls-hand2 { font-family: "Patrick Hand", var(--serif); font-weight: 400; letter-spacing: 0; font-size: 23px; line-height: 1.1; }
.ls-sasongkort .ls-band .ls-sasnamn.ls-hand { font-family: "Caveat namn", var(--serif); font-size: 25px; line-height: 1; letter-spacing: 0; overflow-wrap: normal; }
.ls-sasongkort .ls-band .ls-sasnamn.ls-hand2 { font-family: "Patrick Hand", var(--serif); font-weight: 400; letter-spacing: 0; font-size: 22px; line-height: 1.05; overflow-wrap: normal; }
.ls-grid3.ls-valda { margin-bottom: 6px; } /* PIN-1: the learner's pinned and favourite items, above the level headings */
.dinvecka .dvvadnu { display: block; min-height: 44px; margin: 2px auto 6px; padding: 0 8px; font-size: 15px; font-weight: 600; } /* SLUT-1b re-ask under the next-step card (HEM-LAS, 2026-11-01) */
