/* «حاسبة الهند» at rabe3.com/hand/: the design the owner approved on 2026-11-04, on a real phone's height.
   The fonts come with the page (fonts/, kept on the phone by sw.js), as in the Baloot calculator. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: fallback; src: url("fonts/plex-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: fallback; src: url("fonts/plex-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: fallback; src: url("fonts/plex-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: fallback; src: url("fonts/plex-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: fallback; src: url("fonts/plex-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: fallback; src: url("fonts/plex-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: fallback; src: url("fonts/plex-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: fallback; src: url("fonts/plex-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lalezar"; font-weight: 400; font-display: fallback; src: url("fonts/lalezar-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Lalezar"; font-weight: 400; font-display: fallback; src: url("fonts/lalezar-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Baskerville"; font-weight: 700; font-display: fallback; src: url("fonts/baskerville-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 700; font-display: fallback; src: url("fonts/naskh-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Aref Ruqaa"; font-weight: 700; font-display: fallback; src: url("fonts/aref-ruqaa-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Kalam"; font-weight: 700; font-display: fallback; src: url("fonts/kalam-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* the two looks of «حاسبة رابع!»: the same tokens as its baloot.css */
:root, .look-now {
  --pgT: #b52a4c; --pg: #8a1636; --pgB: #2a0510; --pgD: #4d0a1d; --lat: rgba(255, 217, 112, .07);
  --fg: #fff; --dim: #f6dfd2; --line: rgba(255, 255, 255, .4); --ctl: rgba(0, 0, 0, .22);
  --card: #fffaf0; --panel: #fffaf0; --key: #f5eedd; --edge: #e2d6bb; --rule: #eadfc8; --ink: #1d2230; --muted: #6a655a;
  --acc: #f2b632; --accL: #ffd970; --accD: #a8750b; --accFg: #1d2230; --red: #cf2640; --redD: #a01a30; --delBg: #f7dbe1;
  --num: "Lalezar", "IBM Plex Sans Arabic", "Segoe UI", sans-serif; --numW: 400;
  --ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; --nm: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
.look-navy {
  --pgT: #1f4290; --pg: #14295a; --pgB: #0e1e45; --pgD: #0e1e45; --lat: rgba(227, 181, 74, .05);
  --fg: #fff; --dim: #d5deef; --line: #e3b54a; --ctl: rgba(255, 255, 255, .1);
  --card: #fffdf7; --panel: #fffdf7; --key: #f7f2e6; --edge: #d8d2c2; --rule: #e6e0d0; --ink: #14295a; --muted: #5f6478;
  --acc: #e3b54a; --accL: #f0cf7a; --accD: #a67c1c; --accFg: #14295a; --red: #c0213c; --redD: #971a2f; --delBg: #f6dde2;
  --num: "Libre Baskerville", "Noto Naskh Arabic", Georgia, serif; --numW: 700;
  --ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; --nm: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
}
/* the notebook, the same in both looks */
:root {
  --pen: #1b3f97; --rulec: #b5c4e0; --hl: rgba(255, 224, 102, .62); --winp: rgba(255, 196, 61, .42); --penred: #c71f2d; --marg: #e2a9ae;
  --hand: "Aref Ruqaa", "IBM Plex Sans Arabic", serif; --handn: "Kalam", "IBM Plex Sans Arabic", sans-serif;
  --keyH: 46px; --keyF: 26px; --lineH: 46px; --botH: 56px; --botP: 10px; --ibS: 40px; --panelP: 8px; --keyG: 6px; --topP: 8px;
}
/* a short screen gives a little of everything to the table */
@media (max-height: 680px) { :root { --keyH: 41px; --keyF: 24px; --lineH: 40px; --botH: 50px; --botP: 8px; --ibS: 38px; --panelP: 6px; --keyG: 5px; --topP: 6px; } }
@media (max-height: 590px) { :root { --keyH: 36px; --keyF: 21px; --lineH: 34px; --botH: 44px; --botP: 6px; --ibS: 36px; --panelP: 5px; --keyG: 4px; --topP: 4px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  color: var(--fg); font-family: var(--ui); background-color: var(--pg);
  background-image: repeating-linear-gradient(45deg, transparent 0 23px, var(--lat) 23px 24px), repeating-linear-gradient(-45deg, transparent 0 23px, var(--lat) 23px 24px), radial-gradient(130% 75% at 50% 0%, var(--pgT), var(--pg) 42%, var(--pgB) 100%); }
button { font-family: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* the screen */
.ph { position: relative; width: 100%; max-width: 520px; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden; display: flex; flex-direction: column; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ph input { -webkit-user-select: text; user-select: text; }
.pwa .ph { position: fixed; inset: 0; height: auto; }
/* the phone's keyboard is up: the screen is what remains above it (an iPhone keeps the page's height and covers its bottom) */
.kbd .ph, .pwa.kbd .ph { position: fixed; inset: auto 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); }
.game { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.top { flex: none; display: flex; align-items: center; gap: 6px; padding: max(var(--topP), env(safe-area-inset-top)) 10px 4px; }
.pwa .top { padding-top: calc(env(safe-area-inset-top) + 6px); }
.ib { flex: none; width: var(--ibS); height: var(--ibS); border: 1px solid var(--line); border-radius: 12px; background: var(--ctl); color: var(--fg); display: grid; place-items: center; padding: 0; text-decoration: none; }
.ib svg, .sm svg, .key svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ttl { flex: 1; min-width: 0; font-family: var(--num); font-weight: var(--numW); font-size: 18px; line-height: 1.15; color: var(--accL); white-space: nowrap; overflow: hidden; }
.look-navy .ttl { font-family: var(--nm); font-size: 16px; font-weight: 700; color: #fff; }
.vseg { flex: none; display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.vseg button { height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.vseg button.on { background: linear-gradient(var(--accL), var(--acc)); color: var(--accFg); font-weight: 700; box-shadow: 0 2px 0 var(--accD); }
.subl { flex: none; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0 8px; font-size: 13px; font-weight: 500; color: var(--dim); white-space: nowrap; overflow: hidden; }
.crown { fill: var(--acc); stroke: var(--accD); stroke-width: 1.2; stroke-linejoin: round; }

/* the first screen */
.sBody { flex: 1; min-height: 0; padding: 2px 10px 2px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tseg, .rch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--key); box-shadow: inset 0 0 0 1px var(--edge); }
.tseg button, .rch button { height: 38px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.rch button { font-family: var(--num); font-weight: var(--numW); font-size: 17px; }
.look-navy .rch button { font-size: 14px; }
.tseg button.on, .rch button.on { background: var(--pgD); color: #fff; }
.stp { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--key); box-shadow: inset 0 0 0 1px var(--edge); }
.stp button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 9px; background: #fff; color: var(--ink); font-size: 21px; font-weight: 700; line-height: 1; box-shadow: 0 1px 0 var(--edge); }
.stp button:disabled { opacity: .4; }
.stp b { min-width: 30px; text-align: center; font-family: var(--num); font-weight: var(--numW); font-size: 20px; color: var(--ink); line-height: 1; }
.look-navy .stp b { font-size: 16px; }
.dlTag { padding: 1px 6px 2px; border-radius: 6px; background: var(--acc); color: var(--accFg); font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.form { flex: none; display: flex; flex-direction: column; gap: 7px; padding: 10px; border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: 0 7px 16px rgba(0, 0, 0, .28); }
.fRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.fRow > span { font-size: 14.5px; font-weight: 700; }
.fHint { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.nGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.nCell { position: relative; min-width: 0; }
.nIn { width: 100%; height: 42px; padding: 0 10px; border: 1.5px solid var(--edge); border-radius: 10px; background: #fff; color: var(--ink); font-family: var(--nm); font-size: 16px; font-weight: 600; text-align: right; outline: none; }
.nIn:focus { border-color: var(--accD); box-shadow: 0 0 0 2px rgba(242, 182, 50, .35); }
.nIn::placeholder { color: var(--muted); font-weight: 500; font-size: 14px; }
.nCell.tag .nIn { padding-left: 50px; }
.nCell .dlTag { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.pList { display: flex; flex-direction: column; gap: 5px; }
.pLine { display: grid; grid-template-columns: 46px repeat(2, minmax(0, 1fr)); align-items: center; gap: 5px; padding: 3px 4px; border-radius: 11px; background: var(--key); }
.pLine .pLab { font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); white-space: nowrap; }
.pLine .nIn { height: 40px; }
.resume { flex: none; width: 100%; min-height: 48px; padding: 4px 14px; border: 2px solid var(--acc); border-radius: 14px; background: var(--ctl); color: var(--accL); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.resume b { font-size: 16.5px; font-weight: 700; }
.resume small { font-size: 13px; font-weight: 600; color: var(--dim); }

/* the panel: the page's own number pad, laid out like a phone's, the quick choices beside the digits. The keys press down as
   the Baloot calculator's do (the owner, 2026-11-04: «مش مثل جودة حاسبة البلوت»): a border, a shadow that gives way, a warm
   colour under the finger, and a line above them with who is being written and the number, large. */
.panel { flex: none; margin: 0 10px; padding: var(--panelP); border-radius: 18px; background: var(--panel); color: var(--ink); display: flex; flex-direction: column; gap: 7px; box-shadow: 0 8px 18px rgba(0, 0, 0, .28); }
.pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr); gap: var(--keyG); direction: ltr; touch-action: none; }
.key { height: var(--keyH); padding: 0; border: 2px solid var(--edge); border-radius: 12px; background: var(--key); color: var(--ink); box-shadow: 0 3px 0 var(--edge); display: flex; align-items: center; justify-content: center; gap: 3px; font-family: var(--num); font-weight: var(--numW); font-size: var(--keyF); line-height: 1; touch-action: none; transition: transform .06s, box-shadow .06s, background-color .06s; }
.look-navy .key { font-size: calc(var(--keyF) - 5px); color: #000; }
.key:active, .key.down { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); background: #fff1c9; }
.key.del { border-color: #e7c3cc; background: linear-gradient(#fbeef1, #f4dde3); color: var(--redD); box-shadow: 0 3px 0 #dbb0bb; }
.key.del:active, .key.del.down { background: #efcfd7; box-shadow: 0 1px 0 #dbb0bb; }
.key.nx { grid-column: span 2; direction: rtl; border-color: #000; font-family: var(--ui); font-weight: 700; font-size: 15.5px; background: var(--ink); color: #fff; box-shadow: 0 3px 0 #000; }
.key.nx:active, .key.nx.down { background: #000; box-shadow: 0 1px 0 #000; }
.look-navy .key.nx { font-size: 15.5px; color: #fff; }
.key.ch { direction: rtl; flex-direction: column; gap: 1px; background: #fff; font-family: var(--ui); }
.key.ch b { font-size: 13.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.key.ch i { font-style: normal; font-family: var(--num); font-weight: var(--numW); font-size: 14.5px; line-height: 1.1; }
.look-navy .key.ch { font-size: 14px; color: var(--ink); }
.look-navy .key.ch i { font-size: 12px; }
.key.ch.win { background: var(--acc); border-color: var(--accD); box-shadow: 0 3px 0 var(--accD); color: var(--accFg); }
.key.ch.hand { background: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 #000; color: var(--accL); }
.key.ch.none { background: var(--red); border-color: var(--redD); box-shadow: 0 3px 0 var(--redD); color: #fff; }
.key.ch.win:active, .key.ch.win.down { background: var(--acc); box-shadow: 0 1px 0 var(--accD); }
.key.ch.hand:active, .key.ch.hand.down { background: var(--ink); box-shadow: 0 1px 0 #000; }
.key.ch.none:active, .key.ch.none.down { background: var(--red); box-shadow: 0 1px 0 var(--redD); }
/* another seat holds the round's win: it still answers the finger, to say who */
.key.ch.off { opacity: .42; }
.nudge { animation: nudge .3s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-height: 590px) { .key.ch { gap: 0; } .key.ch b { font-size: 12.5px; } .key.ch i { font-size: 13px; } .look-navy .key.ch i { font-size: 11px; } }
.panel.sheetP { margin-bottom: max(10px, env(safe-area-inset-bottom)); animation: padUp .18s ease-out; }
@keyframes padUp { from { transform: translateY(70px); opacity: .3; } to { transform: none; opacity: 1; } }
.shLine { flex: none; display: flex; align-items: center; gap: 8px; height: var(--lineH); padding: 0 3px; }
.shLine .who { flex: 1; min-width: 0; font-family: var(--nm); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shLine .who.flip { animation: slide .14s ease-out; }
@keyframes slide { from { opacity: .2; transform: translateY(6px); } }
.shLine .val { flex: none; min-width: 96px; height: 100%; padding: 0 12px; border: 2px solid var(--acc); border-radius: 12px; background: #fff; box-shadow: 0 0 0 3px rgba(242, 182, 50, .28); display: flex; align-items: center; justify-content: center; gap: 4px; direction: ltr; font-family: var(--num); font-weight: var(--numW); font-size: calc(var(--keyF) + 3px); line-height: 1; }
.look-navy .shLine .val { font-size: calc(var(--keyF) - 3px); }
.shLine .val small { font-family: var(--ui); font-size: 12.5px; font-weight: 700; color: var(--redD); }
.shLine .val small:empty { display: none; }
#shVal { display: inline-block; border-radius: 6px; }
#shVal.bump { animation: bump .12s ease-out; }
@keyframes bump { from { transform: scale(1.22); } }
.val.typing::after { content: ""; width: 3px; height: .8em; border-radius: 2px; background: var(--accD); animation: blink 1s steps(2) infinite; }
.val.chosen #shVal { padding: 0 4px; background: rgba(242, 182, 50, .35); }
.shLine .val.win { background: var(--acc); border-color: var(--accD); color: var(--accFg); }
.shLine .val.hand { background: var(--ink); border-color: var(--ink); color: var(--accL); }
.shLine .val.none { border-color: var(--red); color: var(--red); }
.shLine .xb { flex: none; width: 44px; height: 100%; padding: 0; border: 0; border-radius: 12px; background: var(--key); color: var(--ink); display: grid; place-items: center; }
.shLine .xb svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* the bottom row */
.bot { flex: none; display: flex; gap: 8px; padding: var(--botP) 10px max(var(--botP), env(safe-area-inset-bottom)); margin-top: auto; }
.game .panel + .bot { margin-top: 0; }
.sm { flex: none; width: 56px; height: var(--botH); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--ctl); color: var(--fg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.sm small { font-size: 11.5px; font-weight: 600; line-height: 1.15; }
.sm:disabled { opacity: .5; }
.save { flex: 1; min-width: 0; height: var(--botH); border: 0; border-radius: 14px; background: linear-gradient(var(--accL), var(--acc)); color: var(--accFg); box-shadow: 0 4px 0 var(--accD); font-size: 19px; font-weight: 700; }
.save:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accD); }
.save:disabled { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; font-size: 16px; font-weight: 600; }
.save:disabled:active { transform: none; }
/* every control answers the finger, as in the Baloot calculator */
.ib, .sm, .vseg button, .tseg button, .rch button, .stp button, .resume, .mOpt, .ghost, .sBtn, .xb, .save { transition: transform .06s, box-shadow .06s, background-color .06s, opacity .06s; }
.ib:active, .sm:active:not(:disabled), .xb:active, .ghost:active, .sBtn:active, .resume:active, .mOpt:active { transform: translateY(2px); }
.ib:active, .sm:active:not(:disabled), .resume:active { background: rgba(0, 0, 0, .36); }
.vseg button:active, .tseg button:active, .rch button:active { transform: translateY(1px); opacity: .75; }
.stp button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; background: #fff1c9; }
.mOpt:active { background: #fff4cf; }
.ghost:active { background: var(--key); }
.sBtn:active { opacity: .85; }
.pn:active, .c.curc:active, .pHd:active, .pc:active { filter: brightness(.92); }

.board { flex: 1; min-height: 0; overflow: hidden; display: flex; padding: 0 10px 9px; }

/* shape 1, «الدفتر»: a line for each player, a column for each round, the highest on top */
.b2 { align-items: center; }
.led, .pBody, .sList { scrollbar-width: none; }
.led::-webkit-scrollbar, .pBody::-webkit-scrollbar, .sList::-webkit-scrollbar { display: none; }
.led { flex: 1; min-width: 0; border-radius: 14px; overflow: hidden auto; overscroll-behavior: contain; background: var(--card); color: var(--ink); box-shadow: 0 7px 16px rgba(0, 0, 0, .3); }
.lrow { display: grid; min-width: 0; }
.lhead { position: sticky; top: 0; z-index: 1; height: 32px; background: var(--pgD); color: #fff; }
.hc { min-width: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; line-height: 1; }
.hc.now { background: var(--acc); color: var(--accFg); font-weight: 700; }
.hc.hn { justify-content: flex-start; padding-inline-start: 7px; }
.hc.ht { font-size: 11px; }
.lp { border-bottom: 1px solid var(--rule); }
.lp:last-child { border-bottom: 0; }
.pn { min-width: 0; padding: 0 5px; border: 0; border-inline-end: 2px solid #e3a9ae; background: none; color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; font-family: var(--nm); font-size: 13.5px; font-weight: 700; line-height: 1.2; text-align: right; overflow: hidden; }
.pnL { max-width: 100%; display: flex; align-items: center; gap: 3px; }
.pnT { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn .crown { flex: none; width: 14px; height: 14px; stroke: none; fill: var(--accD); }
.pn.sel { background: var(--acc); color: var(--accFg); border-inline-end-color: var(--accD); }
.pn.sel .crown { fill: var(--accFg); }
.khbT { font-family: var(--ui); font-size: 11px; font-weight: 700; line-height: 1.25; color: var(--red); white-space: nowrap; }
.lp.khb { background: #fdeef0; }
.lp.khb .pn.sel .khbT { color: #7a0f20; }
.c { min-width: 0; padding: 0; border: 0; border-inline-end: 1px solid var(--rule); background: none; display: flex; align-items: center; justify-content: center; font-family: var(--num); font-weight: var(--numW); font-size: 13.5px; line-height: 1; color: var(--ink); white-space: nowrap; overflow: hidden; }
.look-navy .c { font-size: 10px; }
.roomy .c { font-size: 14.5px; }
.look-navy .roomy .c { font-size: 10.5px; }
.r7 .c, .roomy.r7 .c { font-size: 16px; }
.r5 .c, .roomy.r5 .c { font-size: 19px; }
.look-navy .r7 .c, .look-navy .roomy.r7 .c { font-size: 12px; }
.look-navy .r5 .c, .look-navy .roomy.r5 .c { font-size: 14.5px; }
.c.long { font-size: 11px !important; }
.look-navy .c.long { font-size: 8.5px !important; }
.roomy .pn { font-size: 15px; padding: 0 4px; }
.c.curc { background: #fff2c6; }
.c.win { background: rgba(242, 182, 50, .45); }
.c.hand { background: var(--ink); color: var(--accL); }
.c.none { color: var(--red); }
.c.sel { box-shadow: inset 0 0 0 2.5px var(--accD); background: #fff; }
.c.sel.win { background: var(--acc); } .c.sel.hand { background: var(--ink); }
.c.empty.sel::after, .pc.empty.sel::after { content: ""; width: 2px; height: 60%; background: var(--accD); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tcell { min-width: 0; display: flex; align-items: center; justify-content: center; background: var(--pgD); color: #fff; font-family: var(--num); font-weight: var(--numW); font-size: 18px; line-height: 1; }
.look-navy .tcell { font-size: 12.5px; }
.roomy .tcell { font-size: 20px; }
.look-navy .roomy .tcell { font-size: 14px; }
.tcell.long { font-size: 14px !important; }
.look-navy .tcell.long { font-size: 10px !important; }
.tcell.lead { color: var(--accL); }
.tcell.khb { background: var(--red); color: #fff; }

/* shape 2, «الورقة»: the chosen notebook: handwriting, blue lines, each line the player's total after that round */
.paper { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--pen); background: #fbfaf2; border-radius: 5px 11px 11px 5px; border-left: 9px solid #2a5fc1; box-shadow: 0 7px 16px rgba(0, 0, 0, .32); }
.pHead { flex: none; display: grid; border-bottom: 2px solid var(--rulec); }
.pHd { position: relative; min-width: 0; padding: 18px 1px 3px; border: 0; background: none; color: inherit; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-family: var(--hand); font-weight: 700; line-height: 1.2; overflow: hidden; }
.pHd .pnm { white-space: nowrap; }
.pHd.sel { background: var(--hl); }
.pHd .crown { position: absolute; top: 1px; left: 50%; width: 17px; height: 17px; margin-left: -8.5px; stroke: none; fill: var(--accD); }
.pHd.khb { color: var(--penred); }
.pBan { flex: none; height: 27px; display: flex; align-items: center; justify-content: center; gap: 7px; border-bottom: 1px solid var(--rulec); color: var(--penred); white-space: nowrap; overflow: hidden; }
.pBan .bw, .pBan .bn { font-family: var(--hand); font-weight: 700; font-size: 17px; line-height: 1; }
.pBan .bv { font-family: var(--handn); font-weight: 700; font-size: 21px; line-height: 1; }
.pHn { display: flex; align-items: flex-end; justify-content: center; font-family: var(--ui); font-size: 11px; color: #7d8aa8; padding-bottom: 5px; border-inline-end: 1.5px solid var(--marg); }
.pBody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden auto; overscroll-behavior: contain; }
.pRow { flex: 1 0 16px; min-height: 16px; display: grid; border-bottom: 1px solid var(--rulec); }
.pRow:last-child { border-bottom: 0; }
.pRow.cur { background: var(--hl); }
.pNo { display: flex; align-items: center; justify-content: center; font-family: var(--ui); font-size: 11.5px; color: #7d8aa8; border-inline-end: 1.5px solid var(--marg); }
.pc { min-width: 0; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; font-family: var(--handn); font-weight: 700; color: var(--pen); line-height: 1; white-space: nowrap; overflow: hidden;
  font-size: var(--pcF); font-size: min(var(--pcF), var(--fit, 99px), calc(var(--rowH, 30px) * .95)); }
.pc.win { background: var(--winp); }
.pc.hand { background: var(--pen); color: #ffe89a; }
.pc.none { color: var(--penred); }
.pc.sel { box-shadow: inset 0 0 0 2.5px var(--pen); background: #fff; }
.pc.sel.win { background: var(--winp); } .pc.sel.hand { background: var(--pen); }
.c4 { --pcF: 25px; } .c6 { --pcF: 22px; } .c8 { --pcF: 19px; } .c10 { --pcF: 16.5px; } .c12 { --pcF: 14px; }
.c10 .pHd .pnm, .c12 .pHd .pnm { writing-mode: vertical-rl; height: 56px; }

/* the sheets */
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .48); z-index: 5; border: 0; padding: 0; width: 100%; }
.nw { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); z-index: 6; max-height: calc(100% - 16px); overflow-y: auto; padding: 13px 13px 12px; border-radius: 20px; background: var(--panel); color: var(--ink); display: flex; flex-direction: column; gap: 5px; box-shadow: 0 16px 34px rgba(0, 0, 0, .4); }
.scrim { animation: fade .14s ease-out; }
.nw { animation: riseC .16s ease-out; }
.slip { animation: riseS .18s ease-out; }
.still .scrim, .still .nw, .still .slip { animation: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes riseC { from { opacity: 0; transform: translateY(calc(-50% + 16px)); } }
@keyframes riseS { from { opacity: 0; transform: translateY(calc(-50% + 16px)) rotate(-.6deg); } }
.nw .nt { font-family: var(--num); font-weight: var(--numW); font-size: 23px; text-align: center; color: var(--pgD); }
.look-navy .nw .nt { font-family: var(--nm); font-size: 21px; }
.nw .nwT { margin: 2px 0 8px; font-size: 15px; line-height: 1.5; text-align: center; }
.nw .save { flex: none; width: 100%; height: 48px; margin-top: 6px; font-size: 17px; }
.nw .ghost { flex: none; width: 100%; height: 46px; margin-top: 6px; border: 2px solid var(--edge); border-radius: 13px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 700; }
.mLabel { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mOpt { width: 100%; min-height: 62px; padding: 8px 12px; border: 2px solid var(--edge); border-radius: 13px; background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; text-align: right; }
.mOpt b { font-size: 16px; font-weight: 700; line-height: 1.3; }
.mOpt small { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.mOpt.on { border-color: var(--accD); background: #fff4cf; box-shadow: inset 0 0 0 1px var(--accD); }
.tseg.wide { display: flex; }
.tseg.wide button { flex: 1; }

/* bulletin 3, and the last page: a sheet out of the chosen notebook */
.slip { position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%) rotate(-.6deg); z-index: 6; max-height: calc(100% - 20px); display: flex; flex-direction: column; overflow: hidden; border-radius: 5px 11px 11px 5px; border-left: 9px solid #2a5fc1; background: #fbfaf2; color: var(--pen); box-shadow: 0 16px 34px rgba(0, 0, 0, .45); }
.sHead { flex: none; height: 42px; display: flex; align-items: center; justify-content: center; border-bottom: 2px solid var(--rulec); font-family: var(--hand); font-weight: 700; font-size: 22px; color: var(--penred); }
.sList { flex: 0 1 auto; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; }
.sRow { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-bottom: 1px solid var(--rulec); }
.dense .sRow { min-height: 33px; }
.sRow .n { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-family: var(--hand); font-weight: 700; font-size: 19px; white-space: nowrap; overflow: hidden; }
.dense .sRow .n { font-size: 17px; }
.sRow .nT { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sRow .n .crown { flex: none; width: 19px; height: 19px; stroke: none; fill: var(--accD); }
.sRow .d { flex: none; min-width: 36px; text-align: center; font-family: var(--handn); font-weight: 700; font-size: 14px; color: #66708c; }
.sRow .v { flex: none; min-width: 58px; text-align: left; font-family: var(--handn); font-weight: 700; font-size: 22px; line-height: 1; }
.dense .sRow .v { font-size: 19px; }
.sRow.khb { color: var(--penred); }
.sRow.best .v { text-decoration: underline double; text-underline-offset: 3px; }
.circ { flex: none; padding: 0 8px 1px; border: 1.5px solid var(--penred); border-radius: 50% / 70%; font-size: 14px; line-height: 1.5; color: var(--penred); transform: rotate(-3deg); }
.sBtn { flex: none; margin: 8px 10px 10px; height: 48px; border: 0; border-radius: 12px; background: var(--pen); color: #fff; font-size: 16px; font-weight: 700; }

/* the end of the game: the notebook's last page */
.endS { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; overflow: hidden; color: #fff; background-color: var(--pg); background-image: repeating-linear-gradient(45deg, transparent 0 23px, var(--lat) 23px 24px), repeating-linear-gradient(-45deg, transparent 0 23px, var(--lat) 23px 24px), radial-gradient(130% 75% at 50% 0%, var(--pgT), var(--pg) 42%, var(--pgB) 100%); }
.fin { flex: 1; min-height: 0; margin: max(12px, env(safe-area-inset-top)) 10px 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 5px 11px 11px 5px; border-left: 9px solid #2a5fc1; background: #fbfaf2; color: var(--pen); box-shadow: 0 7px 16px rgba(0, 0, 0, .32); }
.finCheer { flex: none; margin: auto 0; padding: 6px 10px; text-align: center; font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1.3; color: var(--penred); transform: rotate(-2deg); text-wrap: balance; }

/* the draw: the number is the seat (the owner, 2026-11-04: «القرعة يكون الجلوس بالارقام»), shown around the table */
.drawS { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; overflow: hidden; color: #fff; background-color: var(--pg); background-image: repeating-linear-gradient(45deg, transparent 0 23px, var(--lat) 23px 24px), repeating-linear-gradient(-45deg, transparent 0 23px, var(--lat) 23px 24px), radial-gradient(130% 75% at 50% 0%, var(--pgT), var(--pg) 42%, var(--pgB) 100%); }
.drawS .ttl { padding-inline-end: var(--ibS); text-align: center; font-size: 24px; }
.tTable { position: relative; flex: 1 1 auto; min-height: 0; margin: 2px 10px 4px; }
.tFelt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--pg), var(--pgD)); border: 5px solid var(--acc); box-shadow: 0 8px 20px rgba(0, 0, 0, .4), inset 0 0 18px rgba(0, 0, 0, .35); display: grid; place-items: center; font-family: var(--hand); font-weight: 700; line-height: 1; color: var(--accL); }
.tSeat { position: absolute; transform: translate(-50%, -50%); padding: 4px 7px 5px; border-radius: 13px; background: var(--card); border: 2px solid var(--acc); color: var(--ink); text-align: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); animation: seatIn .24s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes seatIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.2); } }
.still .tSeat { animation: none; }
.tSeat b { display: block; font-family: var(--num); font-weight: var(--numW); font-size: 25px; line-height: 1; color: var(--red); }
.look-navy .tSeat b { font-size: 19px; }
.tSeat span { display: block; font-family: var(--nm); font-size: 14.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.tSeat.ends { background: linear-gradient(var(--accL), var(--acc)); border-color: #fff; color: var(--accFg); }
.tSeat.ends b { color: var(--pgD); }
.many .tSeat { padding: 2px 4px 3px; }
.many .tSeat b { font-size: 20px; } .look-navy .many .tSeat b { font-size: 15px; }
.many .tSeat span { font-size: 12.5px; }
.tPanel { flex: none; margin: 0 10px max(10px, env(safe-area-inset-bottom)); padding: var(--panelP) 10px; border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: 0 8px 18px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 6px; }
.tNote { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; text-align: center; }
.tTeams { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; color: var(--muted); }
.tAsk { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tAsk > span { flex: none; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tAsk .tseg { flex: 1; min-width: 0; }
.tAsk .tseg button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tBtns { display: flex; gap: 8px; }
.tBtns .ghost { flex: 0 0 38%; height: var(--botH); border: 2px solid var(--edge); border-radius: 13px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; }
.tBtns .save { flex: 1; font-size: 17px; }
@media (max-height: 590px) { .tNote { font-size: 13px; } .tTeams { font-size: 12px; } .tAsk .tseg button { height: 32px; } }
@media (orientation: landscape) and (max-height: 500px) {
  .drawS { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 310px); grid-template-rows: auto minmax(0, 1fr); }
  .drawS .top { grid-column: 1 / -1; }
  .tPanel { align-self: center; margin: 0 10px 4px 0; }
}

.toast { position: fixed; z-index: 9; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 12px; background: rgba(0, 0, 0, .82); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; pointer-events: none; }

@media (max-width: 380px) {
  .top { gap: 4px; padding-inline: 8px; }
  .ib { width: 36px; height: 36px; }
  .ttl { font-size: 15.5px; }
  .vseg button { padding: 0 7px; font-size: 12.5px; }
  .c, .roomy .c { font-size: 12.5px; }
  .look-navy .c, .look-navy .roomy .c { font-size: 9.5px; }
  .tseg button { padding: 0 7px; font-size: 13px; }
  .stp button { width: 34px; }
  .stp b { min-width: 24px; }
  .rch button { min-width: 30px; padding: 0 6px; }
  .finCheer { font-size: 26px; }
}
@media (max-width: 340px) {
  .ttl { font-size: 14px; }
  .vseg button { padding: 0 6px; font-size: 12px; }
  .c, .roomy .c { font-size: 11.5px; }
}
/* a phone on its side: the table takes one half, the pad the other */
@media (orientation: landscape) and (max-height: 500px) {
  .ph { max-width: none; }
  .game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 310px); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .top, .subl { grid-column: 1 / -1; }
  .subl { height: 18px; }
  .board { grid-column: 1; grid-row: 3 / 5; }
  .panel, .panel.sheetP { grid-column: 2; grid-row: 3; align-self: end; margin: 0 0 4px 10px; }
  .panel.sheetP { grid-row: 3 / 5; }
  .bot { grid-column: 2; grid-row: 4; padding-inline: 0 10px; }
  :root { --keyH: 32px; --keyF: 20px; --lineH: 30px; --botH: 40px; --botP: 4px; --panelP: 4px; --keyG: 3px; --topP: 2px; }
}
