/* Skaitau: the children's app. The look is the locked kid's home
   (docs/design/mockups/lentyna.html, spec §8.1). */
@font-face{font-family:"EB Garamond";src:url(fonts/eb-garamond-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2122;font-display:swap}
@font-face{font-family:"EB Garamond";src:url(fonts/eb-garamond-latin-ext.woff2) format("woff2");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF;font-display:swap}
@font-face{font-family:"Cinzel";font-weight:700;src:url(fonts/cinzel-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2122;font-display:swap}
@font-face{font-family:"Cinzel";font-weight:700;src:url(fonts/cinzel-latin-ext.woff2) format("woff2");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF;font-display:swap}
:root{--ink:#1D1D1F;--mute:#6E6E73;--line:#E5E5EA;--green:#1F7A4D;--tab:#8E8E93}
*{box-sizing:border-box}
body{margin:0;background:#ECECEF;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Geist',system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
a{color:var(--green);text-decoration:none}
button{font:inherit}

/* The app. On a wide screen it is a column 820 wide, as on an iPad;
   on a phone or a tablet it fills the screen. */
.app{position:relative;width:820px;height:100vh;height:100dvh;max-height:1180px;margin:0 auto;background:#FFF;display:flex;flex-direction:column;overflow:hidden}
@media (max-width:1194px){
  body{background:#FFF}
  .app{width:100vw !important;height:100vh !important;height:100dvh !important}
}

/* Top bar */
.top{flex:none;display:flex;align-items:center;justify-content:space-between;padding:env(safe-area-inset-top) 32px 0;height:calc(60px + env(safe-area-inset-top));border-bottom:1px solid transparent;transition:border-color 0.2s}
.top.lined{border-bottom-color:var(--line)}
.brand{font-size:17px;font-weight:600;letter-spacing:-0.01em}
.who{display:flex;align-items:center;gap:12px}
.avatar{width:36px;height:36px;border-radius:50%;background:#F5F5F7;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-family:'EB Garamond',Georgia,serif;font-size:16px;line-height:1}
.who b{font-size:16px;font-weight:500}
.who a{font-size:16px;padding:12px 0 12px 8px}

/* Scrolling page */
.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.content{max-width:1000px;margin:0 auto;padding:20px 56px 120px;display:flex;flex-direction:column;gap:36px}
.hello{margin:0;font-size:40px;font-weight:600;letter-spacing:-0.02em}
.today{display:flex;flex-direction:column;gap:14px}
.today .row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.today .row span:first-child{font-size:20px}
.today .row span:last-child{font-size:17px;color:var(--mute);white-space:nowrap}
.bar{height:6px;border-radius:3px;background:var(--line)}
.bar i{display:block;height:100%;border-radius:3px;background:var(--green)}
h2{margin:0;font-size:15px;font-weight:600;color:var(--mute)}
section{display:flex;flex-direction:column;gap:16px}


/* Continue reading */
.cont{display:flex;gap:36px;align-items:stretch}
.cover{position:relative;display:block;flex:none;border-radius:8px;overflow:hidden;box-shadow:0 10px 28px rgba(29,29,31,0.22)}
.cover img{display:block;width:100%;height:100%;object-fit:cover}
.cover .t{position:absolute;text-align:center}
.cont .cover{width:200px;height:300px}
.info{display:flex;flex-direction:column;justify-content:center;gap:8px;min-width:0}
.info .title{font-family:'EB Garamond',Georgia,serif;font-size:44px;line-height:1.1;letter-spacing:-0.01em}
.info .by,.info .look{font-size:18px;color:var(--mute)}
.info .look{font-size:16px;margin-top:4px}
.info .look a{padding:12px 0}
.info .ch{font-size:18px;margin-top:6px}
.prog{display:flex;align-items:center;gap:14px}
.prog .bar{width:220px;height:4px}
.prog span{font-size:16px;color:var(--mute);white-space:nowrap}
.go{margin-top:12px;align-self:flex-start;height:56px;padding:0 34px;border-radius:28px;background:var(--green);color:#FFF;font-size:19px;font-weight:500;display:flex;align-items:center}

/* My books */
.books{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:36px}
.book{display:flex;flex-direction:column;gap:10px;color:var(--ink)}
.book .cover{width:150px;height:225px;border-radius:6px;box-shadow:0 6px 18px rgba(29,29,31,0.18)}
.book .name{font-family:'EB Garamond',Georgia,serif;font-size:20px;line-height:1.15}
.book .state{font-size:14px;color:var(--mute)}
.book .state.new{color:var(--green);font-weight:500}

/* "Now reading" bar: rises above the tabs once the big card scrolls away. */
.now{position:absolute;left:50%;bottom:calc(var(--tabs-h) + 10px);width:min(560px,calc(100% - 24px));transform:translate(-50%,140%);opacity:0;transition:transform 0.32s cubic-bezier(0.2,0.8,0.2,1),opacity 0.2s;display:flex;align-items:center;gap:12px;padding:8px 8px 8px 10px;border-radius:16px;background:rgba(255,255,255,0.88);-webkit-backdrop-filter:blur(20px) saturate(1.6);backdrop-filter:blur(20px) saturate(1.6);border:1px solid rgba(0,0,0,0.06);box-shadow:0 8px 28px rgba(29,29,31,0.16);color:var(--ink);overflow:hidden}
.now.show{transform:translate(-50%,0);opacity:1}
.now .thumb{width:34px;height:51px;border-radius:4px;overflow:hidden;flex:none;background:#1A120B}
.now .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.now .txt{flex:1;min-width:0;display:flex;flex-direction:column}
.now .txt b{font-family:'EB Garamond',Georgia,serif;font-size:18px;font-weight:500;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.now .txt span{font-size:13px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.now .play{flex:none;height:40px;padding:0 18px;border-radius:20px;background:var(--green);color:#FFF;font-size:16px;font-weight:500;display:flex;align-items:center}

/* Tab bar */
:root{--tabs-h:68px}
.tabs{flex:none;display:grid;grid-template-columns:repeat(3,1fr);height:calc(var(--tabs-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(250,250,252,0.94);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-top:1px solid var(--line)}
.tabs{padding-left:max(0px,calc((100% - 680px) / 2));padding-right:max(0px,calc((100% - 680px) / 2))}
.tab{display:flex;align-items:center;justify-content:center;gap:10px;color:var(--tab);font-size:15px;font-weight:500}
.tab svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tab[aria-current="page"]{color:var(--green)}
.tab[aria-current="page"] svg{stroke-width:2.1}
.tab .badge{font-size:12px;font-weight:600;color:#FFF;background:var(--green);border-radius:9px;padding:1px 6px;margin-left:-4px}

/* Phone */
@media (max-width:600px){
  :root{--tabs-h:56px}
  .top{padding-left:16px;padding-right:16px}
  .content{padding:12px 16px 110px;gap:28px}
  .hello{font-size:32px}
  .today .row span:first-child{font-size:16px}
  .today .row span:last-child{font-size:15px}
  .cont{gap:18px}
  .cont .cover{width:120px;height:180px}
  .info{gap:4px}
  .info .title{font-size:28px}
  .info .by,.info .ch,.info .look{font-size:15px}
  .prog{gap:10px}.prog .bar{width:auto;flex:1}.prog span{font-size:14px}
  .go{height:48px;padding:0 22px;font-size:17px}
  .books{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}
  /* Tabs: icon over label, and room for the home indicator. */
  .tabs{padding-bottom:max(env(safe-area-inset-bottom),20px);height:calc(var(--tabs-h) + max(env(safe-area-inset-bottom),20px))}
  .tab{flex-direction:column;gap:3px;font-size:11px;padding-top:6px;justify-content:flex-start}
  .tab .badge{position:absolute;margin:-4px 0 0 30px;font-size:11px}
  .tab{position:relative}
  .now{bottom:calc(var(--tabs-h) + 28px)}
}

/* Papyrus: the skin of the Egyptian books, drawn by the app around an
   illustration from the book (Tristram Ellis, 1895). Sized by the cover. */
.papyrus{display:flex;flex-direction:column;container-type:size;padding:0;color:#2A1A0C;
  background:
    repeating-linear-gradient(0deg,rgba(120,84,30,0.07) 0 1px,transparent 1px 4px),
    repeating-linear-gradient(90deg,rgba(120,84,30,0.06) 0 1px,transparent 1px 6px),
    radial-gradient(ellipse at 50% 45%,#F0E0B4,#DCC48C 70%,#C8AB6E)}
.papyrus > *{margin-left:6cqw;margin-right:6cqw}
.papyrus > .band:first-child{margin-top:5cqw}
.papyrus > .band:last-child{margin-bottom:5cqw}
.papyrus .band{flex:none;height:3.2cqw;background:repeating-linear-gradient(90deg,#1F4E8C 0 4cqw,transparent 4cqw 5.5cqw,#B23A2E 5.5cqw 9.5cqw,transparent 9.5cqw 11cqw,#C99A2E 11cqw 15cqw,transparent 15cqw 16.5cqw)}
.papyrus .pt{flex:none;text-align:center;padding:4cqw 0 2.5cqw}
.papyrus .pt b{display:block;font-family:'Cinzel',Georgia,serif;font-weight:700;font-size:11.5cqw;line-height:1.02;letter-spacing:0.01em}
.papyrus .pt i{display:block;font-style:normal;font-family:'EB Garamond',Georgia,serif;font-size:8cqw;line-height:1.1;color:#8A2B1F;margin-top:1.5cqw}
.cover.papyrus img{flex:1 1 0;min-height:0;height:0;width:100%;object-fit:contain;mix-blend-mode:multiply;filter:sepia(0.3) contrast(1.3) brightness(1.1);margin-bottom:3cqw;width:auto}
/* Locked books: seen, not opened. */
.book.locked .cover{filter:grayscale(0.85) brightness(0.88) contrast(0.95)}
.book.locked .name{color:var(--mute)}
.lockpin{position:absolute;right:8px;bottom:8px;width:34px;height:34px;border-radius:50%;background:rgba(29,29,31,0.78);display:flex;align-items:center;justify-content:center}
.lockpin svg,.state svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lockpin svg{width:17px;height:17px;color:#FFF}
.state svg{width:13px;height:13px;vertical-align:-1px;margin-right:4px}
.toast{position:absolute;left:50%;bottom:calc(var(--tabs-h) + 18px);transform:translate(-50%,20px);opacity:0;pointer-events:none;width:min(460px,calc(100% - 32px));padding:14px 18px;border-radius:14px;background:rgba(29,29,31,0.92);color:#FFF;font-size:16px;line-height:1.35;text-align:center;transition:transform 0.25s cubic-bezier(0.2,0.8,0.2,1),opacity 0.2s;z-index:10}
.toast.show{transform:translate(-50%,0);opacity:1}
@media (max-width:600px){.toast{bottom:calc(var(--tabs-h) + 36px)}}

/* Opening animation */
.launch{position:absolute;inset:0;z-index:20;background:#FFF;overflow:hidden;cursor:pointer}
.launch .bg{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 42%,#7A5A26,#3A2710 60%,#1E140A);opacity:0}
.launch .word{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px}
.launch .letters{display:flex;font-size:44px;font-weight:600;letter-spacing:-0.02em}
.launch .letters span{display:inline-block;opacity:0}
.launch .under{width:100%;height:4px;border-radius:2px;background:var(--green);transform-origin:left;transform:scaleX(0)}
.launch .hi{position:absolute;left:0;right:0;text-align:center;color:#FFF;font-size:30px;font-weight:600;letter-spacing:-0.01em;opacity:0;text-shadow:0 2px 12px rgba(0,0,0,0.35)}
.launch .sub{position:absolute;left:0;right:0;text-align:center;color:rgba(255,255,255,0.86);font-size:17px;opacity:0}
.launch .card{position:absolute;border-radius:8px;overflow:hidden;opacity:0;box-shadow:0 24px 60px rgba(0,0,0,0.45)}
.launch .card > img{display:block;width:100%;height:100%;object-fit:cover}
.launch .card .t{position:absolute}
@media (max-width:600px){.launch .letters{font-size:38px}.launch .hi{font-size:26px}}

/* The app holds the screen: nothing behind it scrolls or bounces. */
html,body{height:100%;overscroll-behavior:none}
body{overflow:hidden}
[hidden]{display:none !important}
.top .who a,.top .tevams{font-size:16px;color:var(--green);padding:12px 0 12px 8px;cursor:pointer}

/* Skins shared with the papyrus: a band, the title, a picture, a band. */
.vase,.runes{display:flex;flex-direction:column;container-type:size;padding:0}
.vase > *,.runes > *{margin-left:6cqw;margin-right:6cqw}
.vase > .band:first-child,.runes > .band:first-child{margin-top:5cqw}
.vase > .band:last-child,.runes > .band:last-child{margin-bottom:5cqw}
.vase .pt,.runes .pt{flex:none;text-align:center;padding:4cqw 0 2.5cqw}
.vase .pt b,.runes .pt b{display:block;font-family:'Cinzel',Georgia,serif;font-weight:700;font-size:11.5cqw;line-height:1.02;letter-spacing:0.01em}
.vase .pt i,.runes .pt i{display:block;font-style:normal;font-family:'EB Garamond',Georgia,serif;font-size:8cqw;line-height:1.1;margin-top:1.5cqw}
.cover.vase img,.cover.runes img{flex:1 1 0;min-height:0;height:0;width:auto;object-fit:contain;mix-blend-mode:multiply;margin-bottom:3cqw}
/* Greek vase: Flaxman's line drawing (1805) on fired clay, a meander band. */
.vase{color:#1A0E08;background:radial-gradient(ellipse at 50% 40%,#E39A5F,#C8743C 65%,#A85A2A)}
.vase .band{flex:none;height:4.5cqw;background:
  linear-gradient(#1A0E08,#1A0E08) top/100% 0.7cqw no-repeat,
  linear-gradient(#1A0E08,#1A0E08) bottom/100% 0.7cqw no-repeat,
  repeating-linear-gradient(90deg,#1A0E08 0 0.7cqw,transparent 0.7cqw 4cqw)}
.vase .pt i{color:#3A160A}
.cover.vase img{filter:contrast(1.4) brightness(1.05)}
/* Runes: Frølich's drawing (1895) on pale birch, a band of rune strokes. */
.runes{color:#1F2826;background:
  repeating-linear-gradient(0deg,rgba(60,70,60,0.06) 0 1px,transparent 1px 5px),
  radial-gradient(ellipse at 50% 40%,#EEEADB,#D9D3BE 70%,#C2BBA2)}
.runes .band{flex:none;height:4cqw;background:repeating-linear-gradient(115deg,transparent 0 2cqw,#7A2E22 2cqw 2.7cqw,transparent 2.7cqw 4.5cqw,#26302E 4.5cqw 5.2cqw)}
.runes .pt b{font-size:9.5cqw}
.runes .pt i{color:#7A2E22}
.cover.runes img{filter:contrast(1.2)}

/* Who reads */
.pick{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:56px;padding:24px 16px 120px}
.pick h1{margin:0;font-size:44px;font-weight:600;letter-spacing:-0.02em}
.pick .people{display:flex;gap:64px;flex-wrap:wrap;justify-content:center}
.person{display:flex;flex-direction:column;align-items:center;gap:18px;color:var(--ink);cursor:pointer}
.person .face{width:168px;height:168px;border-radius:50%;background:#F5F5F7;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-family:'EB Garamond',Georgia,serif;font-size:68px;line-height:1}
.person b{font-size:26px;font-weight:600;letter-spacing:-0.01em}
.person span:last-child{font-size:16px;color:var(--mute)}
@media (max-width:600px){
  .pick h1{font-size:34px}
  .pick .people{gap:28px;flex-wrap:nowrap}
  .person .face{width:120px;height:120px;font-size:48px}
  .person b{font-size:22px}
  .person span:last-child{font-size:14px;text-align:center;max-width:150px}
}

/* Plain pages: words, progress, the parents' page */
.page h1{margin:0;font-size:34px;font-weight:600;letter-spacing:-0.02em}
.empty{padding:28px;border-radius:16px;background:#F5F5F7;color:var(--mute);font-size:18px;line-height:1.45}
.empty b{display:block;color:var(--ink);font-size:20px;font-weight:600;margin-bottom:6px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.stat{padding:20px;border-radius:16px;border:1px solid var(--line)}
.stat b{display:block;font-size:34px;font-weight:600;letter-spacing:-0.02em}
.stat span{font-size:15px;color:var(--mute)}
.kid{display:flex;flex-direction:column;gap:14px;padding:22px;border-radius:16px;border:1px solid var(--line)}
.kid h2{color:var(--ink);font-size:22px}
.kid ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.kid li{display:flex;justify-content:space-between;gap:12px;font-size:17px}
.kid li span{color:var(--mute);white-space:nowrap}
.kid li span.on{color:var(--green);font-weight:500}
.note{font-size:15px;color:var(--mute);line-height:1.45}
@media (max-width:600px){.stats{gap:10px}.stat{padding:14px}.stat b{font-size:26px}.stat span{font-size:13px}.page h1{font-size:28px}}
.content.full{min-height:100%;padding-bottom:0}
