/* haborym. Desktop structure adapted from the supplied WIN98 template.
Original inspiration: HTML5-Templates.com. 98.css supplies UI primitives. */
/* 1. PALETTE, FONT SIZE, AND DESKTOP VARIABLES */
:root {
  color-scheme: dark;
  --ink: #121212;
  --panel: #282828;
  --slate: #404040;
  --paper: #EDEDE8;
  --light: #FBFBF6;
  --reading-size: 18px;
  --taskbar-height: 40px;
  --surface: var(--panel);
  --button-highlight: var(--paper);
  --button-face: var(--slate);
  --button-shadow: var(--slate);
  --window-frame: var(--ink);
  --dialog-blue: var(--ink);
  --dialog-blue-light: var(--ink);
  --dialog-gray: var(--slate);
  --dialog-gray-light: var(--slate);
  --link-blue: var(--light);
  --raised: inset 1px 1px var(--paper), inset -1px -1px var(--ink), inset 2px 2px var(--slate), inset -2px -2px var(--slate);
  --sunken: inset 1px 1px var(--ink), inset -1px -1px var(--slate);
}

/* 2. SHARED ELEMENTS AND TEXT CONTRAST */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font: 16px/1.5 Arial, sans-serif;
  background: var(--ink);
}

/* 98.css 0.1.18's :read-only also matches ordinary non-editable elements.
Set text on every element so captions and spans cannot become dark grey. */
body, body * {
  color: #FBFBF6 !important;
  text-shadow: none !important;
}

button, input, textarea, select, .window, .title-bar {
  font-family: Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: auto;
}

a {
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

button {
  cursor: pointer;
}

button, .button-link {
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--raised);
  padding: 8px 16px;
  min-height: 40px;
  font: 16px/1.4 Arial, sans-serif;
}

button:not(:disabled):active {
  box-shadow: var(--sunken);
  padding: 8px 16px;
}

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .window-body:focus-visible {
  outline: 2px dotted var(--light);
  outline-offset: -5px;
}

::selection {
  background: var(--slate);
  color: var(--light);
}

[hidden] {
  display: none !important;
}

.pixel-icon {
  image-rendering: pixelated;
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* 3. DESKTOP BACKGROUND AND SHORTCUT ICONS */
#desktop {
  position: relative;
  height: calc(100dvh - var(--taskbar-height));
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ink);
  background-image: radial-gradient(var(--slate) .6px, transparent .6px);
  background-size: 6px 6px;
}

.desktop-icons {
  position: absolute;
  top: 24px;
  left: 16px;
  bottom: 18px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(6, 96px);
  grid-auto-columns: 92px;
  gap: 8px 7px;
  align-content: start;
  z-index: 0;
}

.desktop-icon {
  width: 92px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 3px;
  text-decoration: none;
  border: 1px solid transparent;
  font: 15px/1.15 Arial, sans-serif;
}

.desktop-icon .pixel-icon {
  width: 48px;
  height: 48px;
}

.desktop-icon span {
  padding: 2px 4px;
  background: var(--ink);
  text-align: center;
}

.desktop-icon:hover, .desktop-icon:focus-visible {
  background: var(--panel);
  border: 1px dotted var(--light);
}

.desktop-wordmark {
  position: absolute;
  right: 38px;
  bottom: 27px;
  font: 36px/1.4 'Courier New', monospace;
  text-align: right;
  letter-spacing: -2px;
  user-select: none;
  z-index: -1;
}

.desktop-wordmark span {
  display: block;
  font-size: 12px;
  letter-spacing: .5px;
}

/* 4. WINDOW FRAMES, TITLE BARS, AND CONTROLS */
.desktop-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  top: 48px;
  left: clamp(222px, 22vw, 400px);
  width: min(780px, calc(100vw - 260px));
  height: min(690px, calc(100dvh - 135px));
  min-width: 340px;
  min-height: 300px;
  max-width: 100%;
  max-height: 100%;
  padding: 4px;
  background: var(--panel);
  box-shadow: var(--raised), 4px 4px 0 var(--ink);
  border: 1px solid var(--ink);
  resize: both;
  overflow: hidden;
  z-index: 1;
}

.desktop-window.active {
  z-index: 2;
}

.desktop-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  resize: none;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 4px 5px 4px 8px;
  background: var(--slate);
  gap: 10px;
  flex-shrink: 0;
  cursor: move;
  touch-action: none;
  user-select: none;
}

.active > .title-bar {
  background: var(--ink);
}

.title-bar-text {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font: bold 16px/1.2 Arial, sans-serif;
  margin: 0;
}

.title-bar-text .pixel-icon {
  width: 16px;
  height: 16px;
}

.title-bar-text > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-bar-controls {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.title-bar-controls button {
  min-width: 28px;
  min-height: 27px;
  width: 28px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--panel);
  background-image: none;
  font: bold 21px/1 Arial, sans-serif;
}

.title-bar-controls button:active {
  padding: 0;
}

.title-bar-controls button:hover {
  background: var(--slate);
}

.title-bar-controls button:focus-visible {
  outline: 2px dotted var(--light);
  outline-offset: -4px;
}

.window-menu {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  flex-shrink: 0;
  min-height: 34px;
}

.window-menu a, .window-menu button {
  display: inline-block;
  font: 15px/1.4 Arial, sans-serif;
  padding: 5px 10px;
  min-height: 30px;
  text-decoration: none;
  background: transparent;
  box-shadow: none;
  min-width: 0;
}

.window-menu a:hover, .window-menu button:hover {
  box-shadow: var(--raised);
}

.address-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 7px;
  border-top: 1px solid var(--slate);
  font: 14px/1.5 Arial, sans-serif;
  flex-shrink: 0;
}

.address-bar > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  background: var(--ink);
  box-shadow: var(--sunken);
  padding: 4px 8px;
}

.address-bar .pixel-icon {
  width: 16px;
  height: 16px;
}

.address-bar > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 5. CONTENT TYPOGRAPHY AND HOME WINDOW */
.window-body {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 28px 32px;
  overflow: auto;
  overscroll-behavior: contain;
  font: var(--reading-size)/1.75 'Courier New', Courier, monospace;
  background: var(--panel);
  border: 1px solid var(--ink);
  scrollbar-color: var(--slate) var(--ink);
  scrollbar-width: auto;
}

.window-body h1 {
  font: normal 36px/1.25 'Courier New', Courier, monospace;
  letter-spacing: -1px;
  margin: 0 0 22px;
}

.window-body h2 {
  font: bold 22px/1.5 'Courier New', Courier, monospace;
  margin: 26px 0 12px;
}

.window-body p {
  margin: 0 0 20px;
  max-width: 65ch;
}

.window-body p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  font: 13px/1.5 'Courier New', monospace;
  letter-spacing: 1px;
}

.home-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.home-heading .eyebrow {
  margin-bottom: 12px;
}

.home-heading h1 {
  font-size: 49px;
  margin-bottom: 20px;
}

.home-snake {
  width: 64px;
  height: 64px;
}

.home-intro {
  font-weight: bold;
}

.no-wrap {
  white-space: nowrap;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 27px 0;
}

.home-shortcuts a {
  min-height: 102px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--ink);
  border: 1px solid var(--slate);
  text-decoration: none;
  font: 16px/1.5 Arial, sans-serif;
}

.home-shortcuts a:hover {
  border-color: var(--paper);
}

.home-shortcuts .pixel-icon {
  width: 32px;
  height: 32px;
}

.home-note {
  border-top: 1px dashed var(--slate);
  padding-top: 20px;
}

.window-footer-note {
  margin-top: 26px;
  border-top: 1px solid var(--slate);
  padding-top: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

/* 6. TASKBAR STRUCTURE AND START MENU */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  background: var(--panel);
  border-top: 1px solid var(--paper);
  box-shadow: inset 0 2px var(--slate);
  z-index: 10000;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  min-width: 103px;
  padding: 6px 11px;
  font-size: 17px;
}

.start-button .pixel-icon {
  width: 24px;
  height: 24px;
}

.start-button[aria-expanded=true] {
  box-shadow: var(--sunken);
}

.taskbar-divider {
  height: 34px;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--slate);
  margin: 0 3px;
}

.show-desktop-button {
  padding: 6px;
  min-width: 36px;
  min-height: 38px;
  box-shadow: none;
}

.show-desktop-button .pixel-icon {
  width: 24px;
  height: 24px;
}

.taskbar-items {
  display: flex;
  flex: 1;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.taskbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  max-width: 190px;
  flex: 1;
  min-height: 40px;
  padding: 6px 10px;
  font: 15px/1.5 Arial, sans-serif;
}

.taskbar-item .pixel-icon {
  width: 16px;
  height: 16px;
}

.taskbar-item > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.taskbar-item[aria-pressed=true] {
  background: var(--ink);
  box-shadow: var(--sunken);
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--sunken);
  padding: 3px 8px;
  min-height: 40px;
}

.system-tray button {
  min-width: 28px;
  min-height: 30px;
  padding: 3px;
  box-shadow: none;
}

.system-tray .pixel-icon {
  width: 16px;
  height: 16px;
}

#clock {
  font: 15px/1 Arial, sans-serif;
  white-space: nowrap;
}

.start-menu {
  display: flex;
  position: fixed;
  bottom: var(--taskbar-height);
  left: 3px;
  width: 315px;
  max-height: calc(100dvh - var(--taskbar-height) - 5px);
  overflow-y: auto;
  padding: 4px;
  background: var(--panel);
  box-shadow: var(--raised), 3px -2px 0 var(--ink);
  z-index: 10001;
}

.start-menu-brand {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--ink);
  padding: 14px 7px;
  font: bold 27px/1.2 Arial, sans-serif;
  letter-spacing: 1px;
}

.start-menu-brand span {
  font-size: 14px;
  font-weight: normal;
  margin-top: 15px;
}

.start-menu nav {
  flex: 1;
  padding: 4px;
}

.start-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 43px;
  padding: 5px 12px;
  text-decoration: none;
  font: 16px/1.4 Arial, sans-serif;
  box-shadow: none;
  text-align: left;
}

.start-menu-item .pixel-icon {
  width: 32px;
  height: 32px;
}

.start-menu-item:hover, .start-menu-item:focus-visible {
  background: var(--ink);
}

.start-menu hr {
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--slate);
  margin: 6px 0;
}

/* 7. WRITING INDEX, CONTENT PANELS, AND SETTINGS */
.language-controls, .size-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 25px 0 15px;
}

.language-controls button[aria-pressed=true], .size-controls button[aria-pressed=true] {
  background: var(--ink);
  outline: 1px solid var(--paper);
  outline-offset: -3px;
  box-shadow: var(--sunken);
}

.filter-status {
  font-size: 15px;
}

.writing-group h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--slate);
}

.file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
  border-bottom: 1px dotted var(--slate);
  text-decoration: none;
}

.file-row:hover {
  background: var(--ink);
}

.file-row .pixel-icon {
  width: 32px;
  height: 32px;
}

.file-info {
  min-width: 0;
  flex: 1;
}

.file-info strong {
  font-size: var(--reading-size);
  font-weight: normal;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.file-meta {
  display: flex;
  gap: 15px;
  font: 15px/1.5 Arial, sans-serif;
  margin-top: 5px;
}

.file-arrow {
  font-size: 20px;
}

.editorial-note {
  padding: 14px 16px;
  background: var(--ink);
  border-left: 2px solid var(--slate);
  font-size: 16px;
}

.empty-state {
  padding: 26px 22px;
  margin: 28px 0;
  background: var(--ink);
  border: 1px dashed var(--slate);
}

.empty-state .pixel-icon {
  width: 48px;
  height: 48px;
}

.empty-state h2 {
  margin-top: 12px;
}

.empty-state p {
  font-size: var(--reading-size);
}

.interest-list {
  padding-left: 25px;
}

.interest-list li {
  margin-bottom: 8px;
}

.connections {
  margin: 20px 0;
}

.connections > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--slate);
}

.connections dt {
  font-weight: bold;
}

.connections dd {
  margin: 2px 0 0;
}

fieldset {
  border-image: none;
  border: 1px solid var(--slate);
  padding: 18px;
  margin: 22px 0;
}

legend {
  background: var(--panel);
  padding: 0 8px;
  font: 17px/1.5 Arial, sans-serif;
}

fieldset p {
  font-size: 16px;
  margin-top: 16px !important;
}

.credits {
  font-size: 14px;
}

/* 8. ACCESSIBILITY AND ANIMATION */
.cursor {
  animation: blink 1s steps(2,jump-none) 5;
}

@keyframes blink {
  50% {
    opacity: 0;
  }

}

.skip-link {
  position: fixed;
  top: -100px;
  left: 10px;
  background: var(--ink);
  padding: 10px;
  z-index: 11000;
}

.skip-link:focus {
  top: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.error-window {
  max-width: 650px;
  margin: 15vh auto;
  padding: 35px;
  background: var(--panel);
  box-shadow: var(--raised);
  font: 18px/1.7 'Courier New', monospace;
}

html:not(.js) #desktop {
  height: auto;
  min-height: 100vh;
  padding-bottom: 70px;
  overflow: auto;
}

html:not(.js) .desktop-icons {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  left: 0;
  top: 0;
  padding: 12px;
}

html:not(.js) .desktop-window.visible {
  position: relative;
  left: auto;
  top: auto;
  width: min(90%, 850px);
  height: auto;
  max-height: none;
  margin: 20px auto;
  resize: none;
}

html:not(.js) .title-bar-controls, html:not(.js) .start-button, html:not(.js) .show-desktop-button, html:not(.js) .system-tray button {
  display: none;
}

html:not(.js) .window-body {
  overflow: visible;
}

.no-js {
  margin: 20px;
  background: var(--ink);
  padding: 15px;
}

/* 9. RESPONSIVE LAYOUT */
@media (max-height: 760px) and (min-width: 761px) {
  .desktop-icons {
    grid-template-rows: repeat(4, 96px);
  }

  .desktop-window {
    top: 25px;
    height: calc(100dvh - 105px);
  }

}

@media (max-width: 1000px) and (min-width: 761px) {
  .desktop-window {
    left: 214px;
    width: calc(100vw - 238px);
  }

  .window-body {
    padding: 22px;
  }

}

@media (max-width: 760px) {
  :root {
    --taskbar-height: 44px;
  }

  #desktop {
    min-height: 0;
  }

  .desktop-icons {
    top: 20px;
    left: 12px;
    right: 12px;
    bottom: auto;
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px 8px;
  }

  .desktop-icon {
    width: auto;
    min-height: 95px;
  }

  .desktop-wordmark {
    right: 20px;
    bottom: 30px;
    font-size: 30px;
  }

  .desktop-wordmark span {
    font-size: 11px;
  }

  .desktop-window, .desktop-window.maximized {
    top: 6px !important;
    left: 6px !important;
    width: calc(100% - 12px) !important;
    height: calc(100% - 12px) !important;
    min-width: 0;
    min-height: 0;
    resize: none;
  }

  .title-bar {
    min-height: 44px;
  }

  .title-bar-text {
    font-size: 15px;
  }

  .title-bar-controls button {
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
  }

  .window-menu {
    gap: 0;
    padding-inline: 0;
  }

  .window-menu a, .window-menu button {
    padding-inline: 9px;
    font-size: 15px;
    min-height: 34px;
  }

  .address-bar {
    font-size: 13px;
    gap: 6px;
  }

  .window-body {
    padding: 22px 18px;
  }

  .window-body h1 {
    font-size: 32px;
  }

  .home-heading h1 {
    font-size: 40px;
  }

  .home-heading .eyebrow {
    font-size: 12px;
  }

  .home-snake {
    width: 48px;
    height: 48px;
  }

  .home-heading {
    gap: 10px;
  }

  .home-shortcuts {
    gap: 7px;
  }

  .home-shortcuts a {
    font-size: 15px;
  }

  .window-footer-note {
    font-size: 14px;
  }

  .taskbar {
    gap: 5px;
    padding: 6px 4px;
  }

  .start-button {
    min-width: 86px;
    padding: 6px 8px;
    gap: 6px;
    font-size: 16px;
  }

  .start-button .pixel-icon {
    width: 24px;
    height: 24px;
  }

  .taskbar-divider, .show-desktop-button, .system-tray button {
    display: none;
  }

  .taskbar-item {
    min-width: 80px;
    max-width: 140px;
    font-size: 14px;
    padding: 6px;
  }

  .taskbar-item .pixel-icon {
    display: none;
  }

  .system-tray {
    padding: 4px 7px;
  }

  #clock {
    font-size: 14px;
  }

  .start-menu {
    width: min(315px, calc(100% - 6px));
  }

  .start-menu-item {
    min-height: 46px;
  }

  .language-controls button, .size-controls button {
    min-height: 44px;
    padding: 8px 12px;
  }

  .file-row {
    gap: 10px;
    padding-inline: 0;
  }

  .file-meta {
    font-size: 14px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }

}

/* 10. PRINT LAYOUT */
@media print {
  body {
    background: var(--ink);
  }

  #desktop {
    height: auto;
    overflow: visible;
  }

  .desktop-icons, .desktop-wordmark, .taskbar, .start-menu, .title-bar-controls, .window-menu, .address-bar {
    display: none !important;
  }

  .desktop-window {
    display: none;
  }

  .desktop-window.active {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border: 0;
    box-shadow: none;
    resize: none;
  }

  .window-body {
    overflow: visible;
  }

}

/* Keep library scrollbars within the custom palette. */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  background: var(--ink);
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--panel);
  box-shadow: var(--raised);
}

::-webkit-scrollbar-button {
  background: var(--panel);
  background-image: none;
  box-shadow: var(--raised);
}

::-webkit-scrollbar-corner {
  background: var(--panel);
}

/* 11. FINAL TASKBAR SIZING
Edit this section to change bar, button, icon, and clock sizes together. */
:root {
  --taskbar-height: 40px;
}

.taskbar {
  padding: 3px 4px;
  gap: 5px;
  border-bottom: 1px solid var(--slate);
}

.taskbar button, .taskbar button:not(:disabled):active {
  height: 32px;
  min-height: 32px;
  padding: 4px 10px;
  font-size: 14px;
  line-height: 1;
}

.taskbar .pixel-icon {
  width: 20px;
  height: 20px;
}

.start-button {
  min-width: 90px;
  gap: 7px;
}

.taskbar-divider {
  height: 28px;
  margin: 0 2px;
}

.taskbar .show-desktop-button {
  min-width: 30px;
  padding: 4px;
}

.taskbar-items {
  gap: 4px;
}

.taskbar-item {
  min-width: 90px;
  max-width: 175px;
  gap: 7px;
}

.system-tray {
  min-height: 32px;
  height: 32px;
  padding: 3px 8px;
  gap: 7px;
}

.taskbar .system-tray button {
  min-width: 24px;
  height: 26px;
  min-height: 26px;
  padding: 3px;
}

.taskbar .system-tray .pixel-icon {
  width: 16px;
  height: 16px;
}

#clock {
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 768px) {
  :root {
    --taskbar-height: 44px;
  }

  .taskbar {
    padding: 3px 4px;
    gap: 5px;
  }

  .taskbar button, .taskbar button:not(:disabled):active {
    height: 36px;
    min-height: 36px;
    padding: 4px 9px;
    font-size: 14px;
  }

  .start-button {
    min-width: 86px;
    gap: 6px;
  }

  .taskbar-item {
    min-width: 75px;
    max-width: 120px;
  }

  .system-tray {
    height: 36px;
    min-height: 36px;
    padding: 4px 7px;
  }

}

/* 12. WINDOWS 95/98 CURSORS
PNGs preserve each original CUR file's hotspot. */
:root {
  --cursor-arrow: url('../cursors/arrow.png') 0 0, default;
  --cursor-hand: url('../cursors/pointer.png') 10 10, pointer;
  --cursor-text: url('../cursors/text.png') 10 10, text;
  --cursor-move: url('../cursors/move.png') 10 10, move;
  --cursor-resize: url('../cursors/resize-nwse.png') 10 10, nwse-resize;
}

html, body, #desktop {
  cursor: var(--cursor-arrow);
}

body * {
  cursor: inherit;
}

a, a *, button, button *, summary, summary *, [role='button'] {
  cursor: var(--cursor-hand);
}

.window-body :is(p, h1, h2, h3, li, dt, dd, legend), input, textarea, [contenteditable='true'] {
  cursor: var(--cursor-text);
}

.title-bar, .title-bar * {
  cursor: var(--cursor-move);
}

.title-bar-controls button, .title-bar-controls button * {
  cursor: var(--cursor-hand);
}

.desktop-window::-webkit-resizer {
  cursor: var(--cursor-resize);
}

button:disabled, input:disabled, [aria-disabled='true'] {
  cursor: url('../cursors/not-allowed.png') 10 10, not-allowed;
}

[aria-busy='true'] {
  cursor: url('../cursors/wait.png') 10 10, wait;
}

[title][data-cursor='help'] {
  cursor: url('../cursors/help.png') 10 10, help;
}

body.is-dragging, body.is-dragging * {
  cursor: var(--cursor-move) !important;
}

/* 13. MEADOW GUESTBOOK EMBED
   Meadow controls the theme inside the frame. These rules size its window. */
#guestbook-window .window-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
}

.guestbook-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex: 0 0 auto;
}

.guestbook-toolbar p {
  margin: 0;
  font-size: 16px;
}

.guestbook-toolbar a {
  font: 15px/1.5 Arial, sans-serif;
  white-space: nowrap;
}

.guestbook-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--slate);
  border-radius: 0;
  background: var(--ink);
}

html:not(.js) #guestbook-window .window-body {
  overflow: visible;
}

html:not(.js) .guestbook-frame {
  flex: none;
  height: 600px;
}
