  html, body { margin: 0; height: 100%; background: #101418; color: #d6dbe5; font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
               overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
  #desk { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: auto;
          top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); bottom: env(safe-area-inset-bottom, 0px); left: env(safe-area-inset-left, 0px); }      /* (clear of an iPad's top strip, a notch, the home bar; a browser that does not know env() keeps the zeros) */
        /* not "inset": an older tablet's browser does not know it */
  #note { position: fixed; left: 0; right: 0; bottom: 0; padding: 6px 10px; font-size: 12px; color: #8a93a6; background: rgba(16, 20, 24, .85); z-index: 9000;
          pointer-events: none; white-space: pre-wrap; }
  #fs { position: fixed; left: 0; top: 50%; margin-top: -28px; z-index: 9700; width: 26px; height: 56px; padding: 0; border: 0; border-radius: 0 12px 12px 0; display: flex; align-items: center;   /* the left edge, half way down: a program's own corner buttons keep the corners */
        justify-content: center; background: rgba(16, 20, 24, .78); color: #e6eaf2; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  #fs.on { opacity: .55; }                                                           /* in full screen: still there, less in the way */
  #note:empty { display: none; }                                                     /* nothing to say: no strip over the bottom edge of a window */
  .w.over > span { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; }   /* compound=center: the text lies on the picture */
  .tl { position: absolute; display: inline-flex; flex-direction: column; box-sizing: border-box; transform-origin: 0 0; box-shadow: 0 6px 28px rgba(0, 0, 0, .55);
        background: #f0f0f0; color: #000; font: 10pt Helvetica, Arial, sans-serif; }
  .tl.framed { border: 1px solid #3a4250; }
  .tbar { display: flex; align-items: center; height: 30px; padding: 0 4px 0 10px; background: #1e2430; color: #d6dbe5; font: 12px system-ui, sans-serif; user-select: none;
          -webkit-user-select: none; touch-action: none; flex: none; }
  .tbar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .tbar b { width: 34px; height: 26px; line-height: 26px; text-align: center; font-weight: normal; border-radius: 4px; }
  .tbar b:active { background: #c0392b; color: #fff; }
  .w { box-sizing: border-box; position: relative; flex: none; }
  .w.tl { position: absolute; }
  .frame { display: flex; }
  .nb { display: flex; flex-direction: column; }                                      /* ttk.Notebook: the strip of titles, then the pages - all in one place, the chosen one seen */
  .nbtabs { display: flex; flex: none; flex-wrap: wrap; gap: 1px; }
  .nbtab { font: inherit; padding: 3px 10px; border: 1px solid rgba(0, 0, 0, .35); border-bottom: 0; border-radius: 3px 3px 0 0; margin: 2px 0 0; cursor: pointer; opacity: .82; }
  .nbtab.on { opacity: 1; margin-top: 0; padding-top: 5px; }
  .nbtab:disabled { opacity: .45; cursor: default; }
  .nbbody { display: grid; flex: 1 1 auto; min-width: 0; min-height: 0; border: 1px solid rgba(0, 0, 0, .35); }
  .nbpage { grid-area: 1 / 1; }
  .tv { position: relative; box-sizing: border-box; border: 1px solid rgba(0, 0, 0, .35); min-width: 60px; min-height: 40px; }      /* ttk.Treeview: as big as tk would ask for (its columns x its rows); the rows scroll inside */
  .tvscroll { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: auto; scrollbar-width: thin; }
  .tv table { border-collapse: collapse; table-layout: fixed; font: inherit; }
  .tv th { position: sticky; top: 0; z-index: 1; font-weight: normal; padding: 0 2px; border-right: 1px solid rgba(0, 0, 0, .2); border-bottom: 1px solid rgba(0, 0, 0, .3); white-space: nowrap;
           overflow: hidden; text-overflow: clip; box-sizing: border-box; cursor: default; }
  .tv td { padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: clip; cursor: default; user-select: none; -webkit-user-select: none; }
  .tvtog { display: inline-block; width: 16px; cursor: pointer; }
  .cav { display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; }
  .par { display: flex; flex: none; box-sizing: border-box; min-width: 0; min-height: 0; }
  .label { white-space: pre; display: inline-flex; overflow: hidden; }
  .label img { display: block; flex: none; }
  .btn { font: inherit; margin: 0; cursor: pointer; white-space: pre; display: inline-flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
  .btn:active { filter: brightness(1.25); }
  .entry, .text, .combo, .spin { font: inherit; margin: 0; box-sizing: border-box; border: 1px solid #7a7a7a; padding: 1px 3px; }
  .text { position: relative; padding: 0; white-space: pre-wrap; overflow: hidden; }      /* tk's Text: the box to type in and, under it or in its place, the same text drawn with its tags (tkweb.js textDraw) */
  .text > textarea, .text > .tdraw { position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; margin: 0; border: 0; padding: 1px 3px; font: inherit; color: inherit;
                                     background: transparent; white-space: inherit; overflow: auto; overflow-wrap: break-word; resize: none; tab-size: 8; }
  .text > .tdraw { display: none; }
  .text.runs > .tdraw { display: block; }
  .text.runs > textarea, .text.runs > .tdraw { scrollbar-gutter: stable; }             /* both keep room for the scroll bar: their lines break at the same places */
  .text.ro > textarea { display: none; }
  .text.rw > .tdraw { pointer-events: none; overflow: hidden; }
  .text.rw > textarea { color: transparent; }
  .text.rw > textarea::selection { background: rgba(0, 120, 215, .35); color: transparent; }
  .tline { min-height: 1em; }
  .scale { display: inline-flex; flex-direction: column; align-items: stretch; }
  .scale input { margin: 2px 0; }
  .scale.v { flex-direction: row; }
  .scale.v input { writing-mode: vertical-lr; direction: rtl; }
  .scale .val { text-align: center; font-size: .9em; min-height: 1.2em; }
  .check { display: inline-flex; align-items: center; gap: 4px; white-space: pre; }
  .sep.h { height: 2px; min-width: 8px; align-self: stretch; } .sep.v { width: 2px; min-height: 8px; align-self: stretch; }
  .list { font: inherit; overflow: auto; }
  .prog { overflow: hidden; } .prog i { display: block; height: 100%; }
  canvas.cv { display: block; touch-action: none; }
  .cvfill { position: relative; }                                             /* a drawing area that fills its room (tkweb.js canvasFill): the picture over it, a strut of the height it asks for */
  .cvfill > canvas.cv { position: absolute; left: 0; top: 0; }
  .cvfill::before { content: ''; display: block; width: 0; height: var(--askh, 0px); }
  .menu { position: fixed; z-index: 9500; min-width: 150px; max-width: 86vw; max-height: 80vh; overflow: auto; padding: 4px 0; background: #1e2430; color: #d6dbe5;
          border: 1px solid #3a4250; box-shadow: 0 8px 30px rgba(0, 0, 0, .6); font: 15px system-ui, sans-serif; }
  .menu div { padding: 9px 16px; white-space: nowrap; }
  .menu div.off { color: #6c7482; } .menu div.sepl { padding: 0; height: 1px; margin: 4px 0; background: #3a4250; }
  .menu div.on:active, .menu div.on:hover { background: #2a62a8; color: #fff; }
  .menu div.head { color: #8a93a6; font-size: 12px; padding: 6px 16px 2px; }
  #shade { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9400; }
  #ended { position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; z-index: 9600; background: rgba(10, 12, 16, .92); text-align: center; padding: 24px; }
  #ended button { font: 600 17px system-ui; padding: 12px 26px; border: 0; border-radius: 8px; background: #1f8a55; color: #fff; }
