@font-face {
  font-family: Vazir;
  src: url(vazirmatn.woff2);
}
@font-face {
  font-family: Hafs;
  src: url(hafs.otf);
}
:root {
  font-family: Vazir, Tahoma, sans-serif;
  color: #1e382e;
  background: #f3f3ec;
  --green: #163f36;
  --gold: #9e7842;
  --line: #d6d4c4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: var(--green);
  color: #fffaf0;
  border-bottom: 3px solid #b99c69;
}
.mast,
main {
  max-width: 1120px;
  margin: auto;
  padding: 0 28px;
}
.mast {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 75px;
}
.mast strong {
  font-size: 1.7rem;
}
.seal {
  font: 2.5rem serif;
  color: #dac08d;
}
.divider {
  height: 20px;
  border-right: 1px solid #788e7c;
}
.top,
.running,
footer,
.dialog-top,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top {
  margin: 32px 0 22px;
}
.top small,
.running,
aside label,
.hint,
.credit {
  color: #59695b;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2.1rem;
}
h2 {
  font-size: 1.15rem;
}
h3 {
  font-size: 1rem;
}
button,
input,
select {
  font: inherit;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0.42rem 0.75rem;
  background: #fffefa;
  color: inherit;
}
button {
  cursor: pointer;
}
button:hover {
  background: #e8ede3;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #927236;
  outline-offset: 2px;
}
#jump {
  display: flex;
  align-items: center;
  gap: 8px;
}
#page {
  width: 4.8em;
  text-align: center;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}
.sheet,
aside,
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffef8;
}
.sheet {
  padding: 18px 28px;
  box-shadow: 0 5px 18px #40442c0c;
}
.running {
  font-size: 0.88rem;
}
.running i {
  height: 1px;
  background: var(--line);
  flex: 1;
}
#verses {
  font:
    2.2rem/2.25 Hafs,
    serif;
  text-align: justify;
  min-height: 260px;
  margin: 18px 0;
  padding: 8px 14px;
  border-inline: 3px double #dfd2af;
}
.chapter {
  border-block: 3px double #b7a273;
  background: #f4eedc;
  color: #554a30;
  text-align: center;
  font:
    1.7rem/1.8 Hafs,
    serif;
  margin: 4px 0 14px;
}
.opening {
  text-align: center;
}
.verse {
  cursor: pointer;
  border-radius: 5px;
}
.verse:hover,
.selected {
  background: #e6eddc;
}
.marker {
  font: 1.1rem Vazir;
  color: #816032;
  white-space: nowrap;
}
.word {
  touch-action: pan-y;
  user-select: none;
  -webkit-touch-callout: none;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
footer b {
  color: var(--gold);
}
aside {
  padding: 22px;
}
aside h2 {
  margin-bottom: 16px;
}
aside label {
  display: block;
  margin: 12px 0 6px;
}
.row {
  gap: 5px;
}
.row input {
  width: 0;
  flex: 1;
}
select {
  width: 100%;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
#position,
.hint {
  margin: 8px 0;
  font-size: 0.93rem;
}
.credit,
#status {
  margin: 16px 0;
  font-size: 0.87rem;
}
a {
  color: var(--green);
}
dialog {
  width: min(380px, 92vw);
  padding: 18px;
  color: inherit;
}
dialog::backdrop {
  background: #182a2348;
}
.dialog-top {
  margin-bottom: 12px;
}
#actions {
  display: grid;
  gap: 8px;
}
#actions p {
  line-height: 1.9;
}
#close {
  font-size: 1.3rem;
}
.arabic {
  font:
    1.65rem Hafs,
    serif;
}
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .mast,
  main {
    padding-inline: 14px;
  }
  .sheet {
    padding: 14px;
  }
  .top {
    margin: 20px 0;
    flex-wrap: wrap;
  }
  #verses {
    font-size: 1.85rem;
    padding-inline: 8px;
  }
  aside {
    padding: 16px;
  }
}
