/* Keep the "Built on Wix Headless" badge above the audio player and the tab bar,
   so it never covers the play button (taps were landing on the badge). */
#wixheadless-banner-container{bottom:calc(100px + env(safe-area-inset-bottom)) !important}

/* Levels: Easy (green) A1, Medium (orange) A2, Hard (red, flame) B1 */
.lv-A1{background:#007A55 !important}.lv-A2{background:#F57C00 !important}.lv-B1{background:#E53935 !important}

/* Clicks on the icon in the middle of a button always reach the button (the icon is redrawn while audio plays) */
button svg, button svg *{pointer-events:none}

/* ---------- Genre tabs (Library and Discover): a segmented control ---------- */
.gsec{margin-top:8px}
.gtabs{display:flex;width:max-content;max-width:100%;gap:4px;padding:5px;margin:10px 0 8px;border-radius:16px;background:#F2F3EF;border:1px solid #E6E7E1;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.gtabs::-webkit-scrollbar{display:none}
.gt{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 15px;border:0;border-radius:12px;background:transparent;color:#4a4a47;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer;white-space:nowrap;transition:background-color .2s,color .2s,box-shadow .25s}
.gt svg{width:18px;height:18px;flex:none}
.gt small{font-size:11.5px;font-weight:800;color:#6b6b6b;background:rgba(0,0,0,.06);border-radius:999px;padding:1px 7px;line-height:1.5}
.gt:hover{color:#111;background:rgba(255,255,255,.7)}
.gt.on{background:#fff;color:#00553B;box-shadow:0 1px 2px rgba(0,0,0,.06),0 6px 16px rgba(0,164,67,.16)}
.gt.on small{background:#E3F3EC;color:#00553B}
.gsec .grid{margin-top:12px}
.h.gl{display:flex;align-items:center;gap:8px;margin-top:16px}
.h.gl small{font-size:12.5px;font-weight:600;color:var(--mut)}
.gdesc{color:var(--mut);font-size:14px;margin:2px 0 0}

/* ---------- Reading view: warm paper background ---------- */
body:has(#app.rd){background:#FAF5E9}
#app.rd .rhead,#app.rd .cover-v>.rtop{background:#FAF5E9}
#app.rd .player{background:rgba(250,245,233,.95);border-top-color:#ECE4D2}
#app.rd .rhead{border-bottom-color:#ECE4D2}
#app.rd .tk:hover{background:rgba(120,90,30,.08)}
#app.rd .opt,#app.rd .kwi{background:#FFFDF8}
#app.rd .gr table{background:#F3ECDB}
#app.rd .gr td{border-bottom-color:#FAF5E9}

/* Desktop: the text fills the page better (mobile stays as it is) */
@media(min-width:1024px){
  #app.rd{max-width:1080px}
  #app.rd:has(.cover-v){max-width:1160px}
  #app.rd .player .in{max-width:1080px}
  #app.rd .sn{font-size:29px;line-height:1.7;margin-bottom:14px}
  #app.rd .trl{font-size:17px}
  #app.rd .page{padding-top:14px}
}

/* Word being read: green with a soft shadow; sentence being read: light green with a side line */
.sn.now{background:rgba(0,164,67,.07);box-shadow:inset 3px 0 0 #007A55}
.tk.say{background:#C9EFD7;color:#035A2A;box-shadow:0 0 0 3px #C9EFD7,0 6px 16px rgba(0,164,67,.38);border-radius:6px}

/* Translation switch */
.swt{display:inline-flex;align-items:center;gap:9px;height:36px;padding:0 5px 0 13px;border:1.5px solid #E2DCCB;border-radius:999px;background:#fff;color:#2b2b2b;font:inherit;font-weight:700;font-size:13.5px;cursor:pointer;flex:none;transition:border-color .2s,color .2s}
.swt-k{width:38px;height:24px;border-radius:999px;background:#D3D1C8;position:relative;transition:background-color .2s;flex:none}
.swt-k i{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.swt.on{border-color:rgba(0,164,67,.4);color:#00553B}
.swt.on .swt-k{background:#007A55}
.swt.on .swt-k i{transform:translateX(14px)}
.page:not(.tron) .st-tr{display:none}
@media(max-width:420px){.swt-l{font-size:12.5px}.swt{padding-left:10px;gap:6px}}

/* Close button: clearer, still neutral */
.xcl{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px 0 10px;border-radius:999px;background:#fff;border:1.5px solid #D9D3C3;color:#2b2b2b;font-weight:700;font-size:14px;box-shadow:0 1px 2px rgba(0,0,0,.06);flex:none;text-decoration:none;transition:border-color .2s,box-shadow .2s}
.xcl svg{width:18px;height:18px}
.xcl:hover{border-color:#6b6b6b;box-shadow:0 2px 8px rgba(0,0,0,.08)}
@media(max-width:420px){.xcl span{display:none}.xcl{padding:0 9px}}

/* Quiz: on desktop the next button sits right under the answers */
.qnx{display:none}
@media(min-width:860px){
  .qnx{display:inline-flex;align-items:center;justify-content:center;margin-top:18px;width:auto;min-width:280px}
  .qpl{display:none !important}
}

/* Grammar: key words with word class, meaning and use in the story */
.kwbox{margin-top:8px}
.kwf{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 14px}
.kwf button{height:34px;padding:0 13px;border-radius:999px;border:1.5px solid #E2DCCB;background:#fff;color:#2b2b2b;font:inherit;font-weight:700;font-size:13.5px;cursor:pointer}
.kwf button.on{background:#111;color:#fff;border-color:#111}
.kwl{display:grid;gap:10px}
@media(min-width:860px){.kwl{grid-template-columns:1fr 1fr}}
.kwi{border:1px solid #ECE4D2;border-radius:16px;padding:12px 14px 14px;background:#fff}
.kwi-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.kwi-h .ib{width:34px;height:34px}
.kwi-h .ib svg{width:18px;height:18px}
.kwi-h b{font-family:var(--rd);font-size:19px}
.pos{font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;padding:3px 8px;border-radius:999px}
.pos-noun{background:#E3F0FF;color:#1257A8}.pos-verb{background:#E3F3EC;color:#00553B}.pos-adj{background:#FFF1DC;color:#9A5B00}.pos-adv{background:#F3E8FF;color:#6B2BB0}.pos-exp{background:#EFEFEC;color:#555}
.kwi-m{margin:8px 0 0;font-weight:700;font-size:16px}
.kwi-g{margin:4px 0 0;color:var(--mut);font-size:14.5px;line-height:1.45}
.kwi-x{margin:10px 0 0;padding:10px 12px;border-radius:12px;background:#FAF5E9;font-size:15.5px;line-height:1.5}
.kwi-x mark{background:#DDF4E6;color:#00553B;border-radius:4px;padding:0 2px}
.kwi-x small{display:block;color:var(--mut);font-size:13.5px;margin-top:3px}
.kwbox:not([data-f="all"]) .kwi{display:none}
.kwbox[data-f="noun"] .kwi[data-p="noun"],.kwbox[data-f="verb"] .kwi[data-p="verb"],.kwbox[data-f="adj"] .kwi[data-p="adj"],.kwbox[data-f="adv"] .kwi[data-p="adv"],.kwbox[data-f="exp"] .kwi[data-p="exp"]{display:block}
/* ---------- Top bar: soft shadow and a bit more colour ---------- */
.top{box-shadow:0 1px 0 rgba(0,0,0,.03),0 8px 22px -14px rgba(0,0,0,.28)}
.tabs a:nth-child(1){--tc:#007A55;--tb:#E3F3EC}
.tabs a:nth-child(2){--tc:#1E88E5;--tb:#E3F0FD}
.tabs a:nth-child(3){--tc:#F57C00;--tb:#FFF1E0}
.tabs a:nth-child(4){--tc:#8E44AD;--tb:#F3E8FA}
.tabs a svg{color:var(--tc)}
.tabs a.on{color:var(--ink)}
.tabs a.on svg{color:var(--tc)}
@media(max-width:859px){.tabs{box-shadow:0 -8px 22px -14px rgba(0,0,0,.28)}.tabs a:not(.on) svg{opacity:.75}}
@media(min-width:860px){
  .tabs a{color:#55554f}
  .tabs a:hover{background:#F4F5F1;color:#111}
  .tabs a.on{background:var(--tb);color:#111;box-shadow:0 1px 2px rgba(0,0,0,.05),0 8px 16px -10px var(--tc)}
}
.langbtn{box-shadow:0 2px 8px -4px rgba(0,0,0,.2);background:#fff}

/* ---------- Genre tabs: one colour per genre ---------- */
.gt[data-g="daily"]{--gc:#007A55;--gd:#00553B;--gb:#E3F3EC}
.gt[data-g="romance"]{--gc:#E0457B;--gd:#A3204F;--gb:#FDE7EF}
.gt[data-g="horror"]{--gc:#7B3FE4;--gd:#4F1FA6;--gb:#EFE8FD}
.gt[data-g="scifi"]{--gc:#1E88E5;--gd:#0F5AA3;--gb:#E3F0FD}
.gt svg{color:var(--gc)}
.gt:hover{background:var(--gb);color:var(--gd)}
.gt.on{background:#fff;color:var(--gd);box-shadow:0 1px 2px rgba(0,0,0,.06),0 8px 18px -8px var(--gc)}
.gt.on small{background:var(--gb);color:var(--gd)}
.gtabs{background:linear-gradient(180deg,#F5F6F2,#EEEFEA);box-shadow:inset 0 1px 2px rgba(0,0,0,.04)}

/* ---------- Word balloon: wider, more air between lines ---------- */
.bal{min-width:230px;max-width:min(380px,calc(100vw - 16px));padding:16px 18px 14px;border-radius:18px}
.bal-tr{font-size:21px;line-height:1.3}
.bal-w{font-size:14.5px;margin-top:6px;letter-spacing:.01em}
.bal-g{font-size:14px;line-height:1.6;margin-top:10px;padding-top:10px}
.bal-a{margin-top:12px;gap:8px}
.bal-add{height:36px;padding:0 15px}

/* ---------- Profile: cards with soft shadows ---------- */
.pg:has(>.pf){max-width:880px}
.pf{background:linear-gradient(180deg,#F1FAF4,#fff 70%);border:1px solid #E8EEE9;border-radius:24px;padding:24px 16px 18px;box-shadow:0 14px 34px -22px rgba(0,0,0,.35)}
.pf .av{box-shadow:0 0 0 4px #fff,0 10px 22px -8px rgba(0,164,67,.6)}
.nm{background:transparent}
.acc{background:#fff;box-shadow:0 10px 26px -20px rgba(0,0,0,.35)}
.stats4>div,.stats3>div{background:#fff;border:1px solid #ECECE7;box-shadow:0 10px 24px -18px rgba(0,0,0,.35);transition:transform .2s,box-shadow .2s}
.stats4>div:hover{transform:translateY(-2px);box-shadow:0 14px 28px -18px rgba(0,0,0,.4)}
.stats4>div:nth-child(1) b{color:#E8670C}
.stats4>div:nth-child(2) b{color:#007A55}
.stats4>div:nth-child(3) b{color:#1E88E5}
.stats4>div:nth-child(4) b{color:#8E44AD}
.week{background:#fff;border:1px solid #ECECE7;box-shadow:0 10px 24px -18px rgba(0,0,0,.35);padding:14px}
.set{background:#fff;border:1px solid #ECECE7;border-radius:20px;padding:2px 16px;box-shadow:0 10px 24px -18px rgba(0,0,0,.35)}
.set label:last-child{border-bottom:0}
.set select{background:#FAFAF8;cursor:pointer}
.set select:hover{border-color:#bdbdb6}
/* Footer links to the static story pages (for search engines and people) */
.seol{display:flex;flex-wrap:wrap;gap:8px 18px;justify-content:center;margin:44px 0 8px;font-size:14px}
.seol a{color:var(--mut);font-weight:700}
.seol a:hover{color:#00553B}

/* book-style covers */
.cv.ph.bkv img{width:100%;height:100%;object-fit:cover!important;object-position:top}
.cv.ph.bkv.huge,.cover-v>.cv.ph.bkv{aspect-ratio:3/4!important;height:auto!important;width:min(300px,68vw);max-width:300px;margin:4px auto 16px;background:none;border-radius:4px 12px 12px 4px;overflow:hidden;box-shadow:10px 14px 26px -10px rgba(0,0,0,.45)}
.hero{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:18px!important;align-items:center!important;padding:14px!important}
.hero>span{padding:0!important;min-width:0}
.hero .cv.ph.big{width:118px!important;height:auto!important;aspect-ratio:3/4!important;max-width:118px;margin:0;border-radius:3px 9px 9px 3px;overflow:hidden;box-shadow:8px 10px 18px -8px rgba(0,0,0,.4)}
.hero b{font-size:21px!important}
.hero small{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
@media(min-width:700px){.hero .cv.ph.big{width:150px!important;max-width:150px}.hero b{font-size:26px!important}}
/* hero always full width */
.hx{margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;padding-left:max(18px,calc(50vw - 568px))!important;padding-right:max(18px,calc(50vw - 568px))!important}
@media(max-width:1023px){.hx{display:block!important;padding-top:28px!important;padding-bottom:18px!important}.hx-txt{max-width:none!important}.shelf{margin-top:16px}}
/* moving shelf: keep moving on touch screens */
.mq-t{will-change:transform}
.shelf:hover .mq-t,.mq:hover .mq-t{animation-play-state:running}
@media(hover:hover) and (pointer:fine){.shelf:hover .mq-t{animation-play-state:paused}}
