.mast {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem 1rem; padding:.42rem clamp(.75rem,4vw,4rem); min-height:3.15rem; background:radial-gradient(ellipse at 12% 0,#356d5c,transparent 40%),linear-gradient(115deg,#123a35,#184d43 55%,#153833); border-bottom:3px double #c5a264}
.brand strong {font-size:clamp(1.75rem,2.4vw,2.3rem)}
.mast-button {margin-left:0}
#workspace-nav,#workspace-subnav {display:flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:.12rem .3rem}
#workspace-nav a,#workspace-subnav a {color:inherit; border-radius:.35rem; padding:.32rem .56rem; line-height:1.3; text-decoration:none; white-space:nowrap}
#workspace-nav a {color:#fff4ce}
#workspace-nav a:hover,#workspace-nav a:focus-visible {background:#295e51}
#workspace-nav a[aria-current] {background:#eedcaf; color:#194936}
#workspace-subnav {padding:.22rem .6rem; border-bottom:1px solid #bc9a61; color:#4a3e2a; background:#f5e4c0; font-size:.9rem}
#workspace-subnav a {padding:.2rem .65rem}
#workspace-subnav a[aria-current] {color:#135547; font-weight:bold; box-shadow:inset 0 -2px #377765}
.book:has(.index:not([hidden])) {height:clamp(520px,calc(100dvh - 104px),1020px)}
.workspace-transfer {max-width:36rem; margin:1.2rem 0}
.workspace-transfer a {color:var(--teal)}
@media(max-width:900px) {
  .mast {gap:.3rem .6rem}
  #workspace-nav {order:3; flex-basis:100%; justify-content:flex-start}
  #workspace-nav a {font-size:.92rem; padding:.3rem .5rem}
  /* Keep room and view links in a single reachable row on smaller screens. */
  #workspace-nav,#workspace-subnav {flex-wrap:nowrap; justify-content:flex-start; max-width:100%; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; overscroll-behavior-x:contain; scroll-padding-inline:.5rem; padding-block:.35rem}
  #workspace-nav a,#workspace-subnav a {flex:0 0 auto; scroll-margin-inline:.5rem}
}
@media(max-width:850px) {
  .book:has(.index:not([hidden])) {height:auto}
}
/* Navigation colors are saved in the encrypted workspace. */
.mast{color:var(--spark-header-ink,#fff4ce);background:linear-gradient(115deg,color-mix(in srgb,var(--spark-header-color,#174b42),black 22%),var(--spark-header-color,#174b42) 55%,color-mix(in srgb,var(--spark-header-color,#174b42),black 28%))}
.mast .brand,.mast .brand strong,.mast .brand-sub,.mast .spark,.mast .mast-button,#workspace-nav a{color:var(--spark-header-ink,#fff4ce)}
#workspace-nav a:hover,#workspace-nav a:focus-visible{background:color-mix(in srgb,var(--spark-header-color,#174b42),white 20%)}
#workspace-nav a[aria-current]{background:#eedcaf;color:#194936}
.sr-appearance{border-bottom:1px solid #aa884957;padding:.4rem 0 1rem;margin-bottom:1rem}.sr-appearance input[type=color]{width:3rem;height:2rem;padding:.1rem;vertical-align:middle}
.timer-tray{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center;padding:.4rem;background:#f4e1b9;border-bottom:1px solid #aa884957}.timer-tray-row{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;color:#244f41}.timer-tray time{font-variant-numeric:tabular-nums;font-weight:bold}
.timer-status{display:inline-flex;align-items:center;gap:.3rem;font-size:.85rem}.timer-status::before{content:"";width:.5rem;height:.5rem;border-radius:50%;background:#a76b33}.timer-tray-row[data-state="running"] .timer-status::before{background:#188257;animation:timer-glow 1.5s ease-in-out infinite}.timer-tray-row[data-state="review"] .timer-status::before{background:#9360a6}@keyframes timer-glow{50%{opacity:.35}}@media(prefers-reduced-motion:reduce){.timer-tray-row[data-state="running"] .timer-status::before{animation:none}}
