/* The full-page frame: thin bar on top, the real page below, a button bottom right. */

body.shell { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
/* The idiom footer sits at the bottom of the notes panel; the page itself has no room for one. */
.panel .idiom-foot { padding: 18px 0 10px; }

.bar { position: static; flex: none; border-bottom: 1px solid var(--rule); }

#page { flex: 1; width: 100%; border: 0; background: #fff; display: block; }

.fail { flex: 1; overflow: auto; padding: 3rem 1rem; max-width: 36rem; margin: 0 auto; font: 400 1rem/1.6 var(--sans); color: var(--muted); }
.fail h1 { color: var(--ink); font-size: 2rem; }

/* The cnote button, bottom right. */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 12px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  cursor: pointer;
}
.fab .cent { font: 400 22px/1 var(--serif); }
.fab .count { font: 600 12px/1 var(--sans); }
.fab[aria-expanded="true"] { background: var(--ink); }
.fab[aria-expanded="true"] .cent, .fab[aria-expanded="true"] .count { color: var(--paper); }

/* Notes panel, above the button. */
.panel {
  position: fixed; right: 18px; bottom: 74px; z-index: 20;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100dvh - 40px - 100px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  padding: 14px 16px 6px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font: 600 1.0625rem/1.2 var(--serif); margin-bottom: .4rem; }
.panel-head button.link { font: 400 .8125rem/1 var(--sans); color: var(--muted); }
.panel-hint, .panel-foot { font: 400 .8125rem/1.45 var(--sans); color: var(--muted); margin: 0 0 .8rem; }
.panel-foot button.link { color: var(--ink); }
.panel .note { border-top: 1px solid var(--rule); padding: .8rem 0; color: var(--ink); }
.panel .note:first-child { border-top: 0; }
.panel .note.hot { background: color-mix(in srgb, var(--mark) 25%, transparent); }
.panel .note .quote { font: 400 .9375rem/1.45 var(--serif); color: var(--muted); }
.panel .note .goto { font-size: .8125rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: var(--paper); font: 400 .875rem/1.4 var(--sans);
  padding: .6rem .9rem; max-width: calc(100vw - 2rem);
}
