/* What Ferdowsi Let In: only what this piece draws. The plate, the frame, the keycaps,
   the key strip and the wall label are the site's (/assets/main.css, _readings.scss).
   In the frame the field is cobalt and the Arabic words are cream. The deaths are the one
   red: the wall label names them so. The word you are on is your hand: yellow. */

@font-face {
  font-family: "Hand";
  src: url("data/hand.woff2") format("woff2");
  font-display: block;
}

/* the piece's own Persian (its verse, its headings, the words the wall label quotes) stays
   in its hand; Persian that labels the page is the site's */
.ro-label [lang="fa"], .ro-panel .where [lang="fa"] { font-family: "Hand", var(--serif); unicode-bidi: isolate; font-size: 1.15em; }

#ghost, #death, #words, #plates { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#plates { pointer-events: none; opacity: 0; }
body.exploded #words { cursor: default; }
#words { cursor: crosshair; }
#words.dragging { cursor: grabbing; }

/* ---- the couplet under the pointer, or under j / k: the site's verse form (_readings.scss) ---- */
.ro-panel { --ro-hand: "Hand"; }
.ro-panel .gloss { display: inline-flex; align-items: baseline; gap: .5em; font: italic 400 .98rem/1.3 var(--serif); color: var(--ro-mark); }
.ro-panel .gloss:empty { display: none; }
.ro-panel .gloss [lang="fa"] { font: normal 400 1.15rem/1 "Hand", serif; }
.ro-panel .gloss small { font: normal 400 .7rem/1 var(--mono); color: var(--ro-mark-soft); }

/* the word j / k is on: your hand, a yellow rule under it */
.sel-rule {
  position: absolute; left: 0; top: 0; z-index: 1;
  height: 2px; background: var(--yellow); border-radius: 1px;
  pointer-events: none;
}

/* the deaths key, with the red it shades the field in */
.ro-ferdowsi .ro-key { flex: 0 1 240px; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.ro-ferdowsi .ro-key::after { content: ""; width: 18px; height: 8px; background: var(--red); border-radius: 1px; }

.fallback { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 400 .8rem/1.5 var(--mono); color: var(--ro-mark); }
main > .fallback, body > .fallback { position: static; }

/* ---- in Persian (../lang.js): what the piece writes is set in the site's Persian face, upright,
   without the mono's spacing and capitals; the word itself keeps its hand ---- */
html[data-lang="fa"] :is(.layer-label, .solo, .ro-panel .count, .ro-panel .line .n, .ro-panel .gloss),
html[data-lang="fa"] :is(.layer-label, .solo, .ro-panel .gloss) :not(.fp-k):not(kbd):not([lang="fa"]) {
  font-family: var(--fa); letter-spacing: 0; text-transform: none; font-style: normal;
}
