/* InkToday app screens for the site: PocketBook 970 frame + screens drawn at 412x600
   (half of the 825x1200 panel) and scaled to the frame by screens.js. */

/* PocketBook 970 (InkPad Lite): 173 x 236.2 x 7.9 mm, 9.7" 825x1200 panel (139.6 x 203 mm), even 16.7 mm bezels */
.pb {
  position: relative;
  aspect-ratio: 173 / 236.2;
  border-radius: 4.6% / 3.4%;
  background:
    radial-gradient(120% 60% at 15% 0%, rgba(255, 255, 255, .10), transparent 60%),
    linear-gradient(165deg, #3a3a3a, #272727 45%, #1d1d1d);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .07),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 2px 3px rgba(0, 0, 0, .3),
    0 30px 60px -24px rgba(0, 0, 0, .55);
}
.pb-glass {
  position: absolute;
  left: 9.65%;
  right: 9.65%;
  top: 7.03%;
  bottom: 7.03%;
  overflow: hidden;
  background: #efefec;
  box-shadow: 0 0 0 1.5px #111, 0 0 0 3px rgba(255, 255, 255, .05);
}
.pb-glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .28);
  background: linear-gradient(118deg, rgba(255, 255, 255, .22) 0 26%, rgba(255, 255, 255, 0) 26.3%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .08)); }
.pb-glass > .scr { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--k, 1)); }

/* 3D body: front face, four side faces of the 7.9 mm edge and the back (built by screens.js for .device).
   Right edge, as in the PocketBook 970 manual: microSD slot, LED and USB-C (the keys are left out). */
.device { --w: 360px; --t: calc(var(--w) * .0457); position: relative; width: var(--w); aspect-ratio: 173 / 236.2; transform-style: preserve-3d; }
.device > .pb { position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .14); }
.device > .back { position: absolute; inset: 0; border-radius: 4.6% / 3.4%; background: #1a1a1a; transform: translateZ(calc(var(--t) * -1));
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .5), 0 20px 30px -20px rgba(0, 0, 0, .35); }
.device > .side { position: absolute; background: linear-gradient(90deg, #333, #5e5e5e 45%, #4c4c4c 55%, #2a2a2a); }
.device > .side.l, .device > .side.r { top: 3%; bottom: 3%; width: var(--t); }
.device > .side.t, .device > .side.b { left: 4%; right: 4%; height: var(--t); background: linear-gradient(#333, #5e5e5e 45%, #4c4c4c 55%, #2a2a2a); }
.device > .side.l { left: 0; transform-origin: 0 50%; transform: rotateY(90deg); }
.device > .side.r { right: 0; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.device > .side.t { top: 0; transform-origin: 50% 0; transform: rotateX(-90deg); }
.device > .side.b { bottom: 0; transform-origin: 50% 100%; transform: rotateX(90deg); }
/* parts on the right edge; top values are shares of the body height measured from the manual's drawing */
.side .part { position: absolute; left: 22%; right: 22%; }
.side .sd { top: calc(9% - 3%); height: 4.5%; left: 38%; right: 38%; background: #0c0c0c; border-radius: 2px; }
.side .led { top: calc(86.5% - 3%); height: 1.2%; left: 40%; right: 40%; border-radius: 50%; background: #ddd; box-shadow: 0 0 4px rgba(255, 255, 255, .8); }
.side .usb { top: calc(90% - 3%); height: 3.8%; left: 26%; right: 26%; border-radius: 4px; background: #050505; box-shadow: 0 0 0 1.5px #888; }
.side .usb::after { content: ""; position: absolute; left: 35%; right: 35%; top: 18%; bottom: 18%; background: #444; border-radius: 1px; }

/* ---------- screen ---------- */
.scr {
  width: 412px;
  height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #efefec;
  color: #000;
  font: 12px/1.25 "InkToday Sans", Roboto, "Noto Sans", "Segoe UI", system-ui, sans-serif;
  text-align: left;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
.scr * { box-sizing: border-box; }
.scr svg.i { width: 1em; height: 1em; fill: currentColor; flex: none; vertical-align: -.125em; }

.scr .bar { flex: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
            padding: 6px 10px; border-bottom: 2px solid #000; font-weight: 700; font-size: 15px; }
.scr .bar .back { display: flex; align-items: center; gap: 8px; }
.scr .icons { display: flex; gap: 6px; }
.scr .ib { width: 30px; height: 30px; border: 1.5px solid #000; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.scr .body { flex: 1; overflow: hidden; padding: 6px 10px; position: relative; }
.scr .sec { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 5px; font-weight: 700; font-size: 12px; }
.scr .sec span { font-weight: 400; font-size: 11px; }
.scr .lib { border: 2px solid #000; border-radius: 6px; padding: 2px 6px 7px; }

.scr .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.scr .tile { min-width: 0; }
.scr .tile .t { font-size: 11px; font-weight: 700; height: 27px; margin-top: 3px; overflow: hidden; line-height: 1.2; }

/* covers: made-up books drawn in covers.js */
.scr .cov { position: relative; width: 100%; height: 128px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px #000; }
.scr .cov.svgc svg { display: block; width: 100%; height: 100%; }
.scr .badge { position: absolute; top: 4px; right: 4px; z-index: 1; background: #000; color: #fff; font-weight: 700; font-size: 10px; padding: 1px 4px; border-radius: 3px; }

.scr .btn { display: flex; align-items: center; justify-content: center; gap: 4px; height: 24px; margin-top: 3px; border: 1.5px solid #000;
            border-radius: 5px; font-weight: 700; font-size: 10px; white-space: nowrap; background: #efefec; }
.scr .btn.dark { background: #000; color: #fff; }
.scr .btn.muted { border-style: dashed; font-weight: 400; color: #333; }

.scr .tabs { flex: none; display: flex; border-top: 2px solid #000; font-size: 11px; }
.scr .tabs div { flex: 1; text-align: center; padding: 7px 0 6px; border-right: 1px solid #000; }
.scr .tabs div:last-child { border-right: none; }
.scr .tabs .i { display: block; margin: 0 auto 3px; font-size: 17px; }
.scr .tabs .on { background: #000; color: #fff; font-weight: 700; }
.scr .pager { flex: none; font-size: 11px; text-align: center; border-top: 2px solid #000; padding: 6px; }

/* book card */
.scr .top { display: flex; gap: 10px; }
.scr .top .cov { width: 112px; height: 160px; flex: none; }
.scr .title { font-size: 17px; font-weight: 700; line-height: 1.15; }
.scr .author { font-size: 13px; margin: 3px 0 7px; }
.scr .meta { font-size: 11px; line-height: 1.65; }
.scr .meta .i { width: 14px; margin-right: 3px; }
.scr .main { height: 38px; margin-top: 10px; border-width: 2px; border-radius: 6px; font-size: 14px; gap: 7px; }
.scr .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.scr .row2 .btn { height: 32px; font-size: 12px; font-weight: 400; gap: 6px; }
.scr .why { font-size: 11px; border: 1px dashed #000; padding: 6px 8px; margin-top: 8px; line-height: 1.4; }
.scr .h { font-weight: 700; font-size: 11px; margin: 11px 0 3px; }
.scr .ann { font-family: Georgia, "Times New Roman", serif; font-size: 12.5px; line-height: 1.38; max-height: 70px; overflow: hidden; }
.scr .more { font-size: 11px; text-decoration: underline; margin-top: 2px; }
.scr .ch { font-size: 11px; display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #bbb; }
.scr .ch.new { font-weight: 700; }

/* lists (series, downloads) */
.scr .stitle { font-size: 17px; font-weight: 700; }
.scr .smeta { font-size: 11px; margin: 3px 0 8px; }
.scr .wide { height: 34px; font-size: 13px; margin-bottom: 6px; }
.scr .item { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #bbb; }
.scr .item.cur { background: #ddd; margin: 0 -10px; padding: 6px 10px; }
.scr .num { font-weight: 700; font-size: 18px; width: 22px; text-align: center; flex: none; }
.scr .item .cov { width: 34px; height: 48px; flex: none; }
.scr .it { flex: 1; min-width: 0; }
.scr .it .tt { font-size: 12px; font-weight: 700; line-height: 1.15; }
.scr .it .m { font-size: 10px; color: #333; margin-top: 2px; }
.scr .item .btn { width: 92px; height: 28px; flex: none; margin: 0; }
.scr .sum { font-size: 11px; border: 1.5px solid #000; border-radius: 6px; padding: 6px 8px; margin: 4px 0 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scr .sum .btn { padding: 0 8px; height: 26px; margin: 0; }

/* dialog */
.scr .dim { position: absolute; inset: 0; background: rgba(242, 242, 239, .75); }
.scr .dlg { position: absolute; left: 26px; right: 26px; top: 64px; background: #f2f2ef; border: 3px solid #000; border-radius: 10px; padding: 14px; text-align: center; }
.scr .dlg .dt { font-weight: 700; font-size: 16px; margin-bottom: 4px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.scr .dlg .sub { font-size: 12px; margin-bottom: 8px; }
.scr .dlg .qr { width: 172px; height: 172px; margin: 0 auto; display: block; }
.scr .dlg .url { font-weight: 700; font-size: 12px; margin: 6px 0 8px; }
.scr .dlg .steps { text-align: left; font-size: 12px; line-height: 1.5; margin: 6px 0 10px; }
.scr .dlg .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scr .dlg .btns .btn { height: 34px; font-size: 12px; }

/* start / login */
.scr .center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 28px; text-align: center; position: relative; }
.scr .logo { width: 132px; height: auto; margin-bottom: 14px; }
.scr .tag { font-size: 12px; color: #333; margin-top: 2px; }
.scr .status { margin-top: 26px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.scr .status .i { font-size: 30px; }
.scr .steps2 { margin-top: 14px; font-size: 12px; text-align: left; line-height: 1.9; }
.scr .steps2 .i { margin-right: 6px; }
.scr .form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.scr .field { height: 40px; border: 2px solid #000; border-radius: 6px; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 14px; color: #555; }
.scr .field.focus { border-width: 3px; color: #000; }
.scr .form .btn { height: 40px; border-width: 2px; border-radius: 6px; font-size: 14px; gap: 6px; margin: 0; }
.scr .form .btn.light { font-weight: 400; }
.scr .disc { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #333; text-align: center; padding: 8px 14px; border-top: 1px solid #bbb; }

/* settings (variant C) */
.scr .set { display: flex; flex-direction: column; gap: 3px; padding: 5px 10px; }
.scr .set .sec { margin: 6px 0 1px; font-size: 10.5px; }
.scr .row { display: flex; align-items: center; gap: 8px; min-height: 25px; border-bottom: 1px solid #ccc; font-size: 12px; }
.scr .row .l { flex: 1; }
.scr .cb { width: 16px; height: 16px; border: 1.5px solid #000; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; flex: none; }
.scr .cb.on { background: #000; color: #fff; }
.scr .seg { display: flex; border: 1.5px solid #000; border-radius: 5px; overflow: hidden; flex: none; font-size: 11px; }
.scr .seg span { padding: 2px 9px; border-right: 1.5px solid #000; }
.scr .seg span:last-child { border-right: none; }
.scr .seg .on { background: #000; color: #fff; font-weight: 700; }
.scr .two { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.scr .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 2px; }
.scr .grid2 .btn { height: 30px; font-size: 11px; font-weight: 400; gap: 6px; margin: 0; }
