.poetry-meter-page {
  background: #f7fafb;
  color: #15242b;
}


.poetry-meter-page [hidden],
.poetry-meter-page .is-hidden {
  display: none !important;
}

.pm-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 16px 54px;
  box-sizing: border-box;
}

.pm-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 18px;
  color: #5c6b73;
  font-size: 0.92rem;
}

.pm-breadcrumbs a {
  color: #087d8f;
  text-decoration: none;
  font-weight: 800;
}

.pm-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.70fr) minmax(360px, 1.30fr);
  gap: 18px;
  align-items: start;
}

.pm-input-panel,
.pm-result-panel,
.pm-recent {
  border: 1px solid #dce8ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(28, 55, 64, 0.08);
}

.pm-input-panel {
  padding: 22px;
}

.pm-result-panel {
  min-height: 560px;
  padding: 18px;
}

.pm-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.pm-kicker {
  color: #b56d16;
  font-size: 0.84rem;
  font-weight: 900;
}

.pm-heading h1,
.pm-section-heading h2,
.pm-result-block h2 {
  margin: 0;
  color: #14333c;
  line-height: 1.45;
  letter-spacing: 0;
}

.pm-heading h1 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
}

.pm-heading p {
  margin: 0;
  color: #536770;
  line-height: 1.8;
}

.pm-form,
.pm-field,
.pm-controls {
  display: grid;
  gap: 14px;
}

.pm-two-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pm-field span {
  color: #263b44;
  font-weight: 900;
}

.pm-field input,
.pm-field textarea {
  width: 100%;
  border: 1px solid #cfdee3;
  border-radius: 8px;
  background: #fbfdfd;
  color: #172a31;
  padding: 12px 13px;
  font: inherit;
  line-height: 1.8;
  resize: vertical;
  box-sizing: border-box;
}

.pm-field textarea {
  min-height: 150px;
}

.pm-field input:focus,
.pm-field textarea:focus {
  outline: 3px solid rgba(8, 125, 143, 0.16);
  border-color: #087d8f;
}

.pm-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-segment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #dce8ec;
  border-radius: 8px;
}

.pm-segment legend {
  padding: 0 6px;
  color: #48606a;
  font-size: 0.84rem;
  font-weight: 900;
}

.pm-segment label {
  cursor: pointer;
}

.pm-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pm-segment span {
  display: inline-grid;
  min-height: 36px;
  place-items: center;
  border: 1px solid #cfdee3;
  border-radius: 8px;
  padding: 7px 12px;
  color: #304851;
  background: #ffffff;
  font-weight: 900;
}

.pm-segment input:checked + span {
  border-color: #087d8f;
  background: #e8f6f8;
  color: #075e6b;
}

.pm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pm-button,
.pm-mini-button,
.pm-recent-item {
  border: 1px solid #cfdee3;
  border-radius: 8px;
  background: #ffffff;
  color: #20363e;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.pm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
}

.pm-button-primary {
  border-color: #087d8f;
  background: #087d8f;
  color: #ffffff;
}

.pm-button-ghost {
  color: #8b2f2f;
  border-color: #efc6c2;
  background: #fff8f7;
}

.pm-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.pm-meta {
  margin: 0;
  color: #5e7179;
  font-weight: 800;
}

.pm-meta.is-danger {
  color: #9a2b2b;
}

.pm-result-empty {
  min-height: 520px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #60757e;
  text-align: center;
}

.pm-result-empty span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid #dbe8eb;
  border-radius: 8px;
  background: #f2f8f9;
  color: #087d8f;
  font-size: 1.7rem;
  font-weight: 900;
  direction: ltr;
}

.pm-status {
  margin-bottom: 14px;
  border: 1px solid #dce8ec;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f6fafb;
  color: #26414b;
  font-weight: 900;
}

.pm-status.is-error {
  border-color: #efc6c2;
  background: #fff8f7;
  color: #8b2f2f;
}

.pm-status.is-success {
  border-color: #b7dcc9;
  background: #f2fbf6;
  color: #1f6844;
}

.pm-result-content {
  display: grid;
  gap: 14px;
}

.pm-summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr;
  gap: 10px;
}

.pm-summary-item {
  display: grid;
  gap: 7px;
  border: 1px solid #dce8ec;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 13px;
}

.pm-summary-item span {
  color: #60737c;
  font-size: 0.85rem;
  font-weight: 900;
}

.pm-summary-item strong {
  color: #14333c;
  font-size: 1.12rem;
  line-height: 1.55;
}

.pm-summary-item meter {
  width: 100%;
  height: 10px;
}

.pm-result-block {
  display: grid;
  gap: 10px;
  border: 1px solid #dce8ec;
  border-radius: 8px;
  padding: 14px;
}

.pm-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pm-result-block h2 {
  font-size: 1.05rem;
}

.pm-mini-button {
  min-height: 34px;
  padding: 6px 10px;
}

.pm-pre {
  margin: 0;
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  color: #14333c;
  padding: 14px;
  direction: rtl;
  line-height: 1.9;
  white-space: pre-wrap;
  font-family: "Amiri Quran", "Tahoma", sans-serif;
  font-size: 0.95rem;
}

.pm-notes {
  background: #f8fbfc;
  color: #263d46;
  border: 1px solid #dce8ec;
}

.pm-table-wrap {
  overflow-x: auto;
}

.pm-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.pm-table th,
.pm-table td {
  border-bottom: 1px solid #e3edf0;
  padding: 10px;
  text-align: right;
  vertical-align: top;
}

.pm-table th {
  color: #536770;
  font-size: 0.90rem;
}

.pm-table td strong,
.pm-pattern {
  display: block;
  color: #172a31;
  line-height: 1.8;
}

.pm-pattern {
  direction: ltr;
  text-align: left;
  font-weight: 900;
}




.pm-prosody {
  display: block;
  margin-top: 4px;
  color: #172a31;
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 400;
}

.pm-good {
  display: block;
  margin-top: 4px;
  color: #1f6844;
  line-height: 1.65;
}





.pm-good {
  color: #172a31;
}

.pm-rhyme-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.pm-rhyme-item {
  display: grid;
  gap: 5px;
  border: 1px solid #dce8ec;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfd;
}

.pm-rhyme-item.is-match {
  border-color: #b7dcc9;
}

.pm-rhyme-item span,
.pm-rhyme-item small {
  color: #60737c;
  font-weight: 800;
}

.pm-rhyme-item strong {
  color: #b56d16;
  font-size: 1.35rem;
}

.pm-recent {
  margin-top: 18px;
  padding: 18px;
}

.pm-section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.pm-recent-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.pm-recent-heading > div {
  display: grid;
  gap: 4px;
}

.pm-clear-recent {
  flex: 0 0 auto;
  color: #8b2f2f;
  border-color: #efc6c2;
  background: #fff8f7;
  white-space: nowrap;
}

.pm-mini-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.pm-recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.pm-recent-item {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
  text-align: right;
}

.pm-recent-item:hover,
.pm-recent-item:focus {
  border-color: #087d8f;
  outline: 3px solid rgba(8, 125, 143, 0.13);
}

.pm-recent-item strong {
  color: #14333c;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pm-recent-item span {
  color: #647982;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .pm-workspace {
    grid-template-columns: 1fr;
  }

  .pm-result-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .pm-shell {
    width: 100%;
    padding: 16px 10px 54px;
  }

  .pm-input-panel,
  .pm-result-panel,
  .pm-recent {
    padding: 14px;
  }

  .pm-two-fields,
  .pm-controls,
  .pm-summary-grid {
    grid-template-columns: 1fr;
  }

  .pm-heading h1 {
    font-size: 1.45rem;
  }

  .pm-button {
    width: 100%;
  }

  .pm-recent-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .pm-clear-recent {
    width: 100%;
  }
}


.pm-pre {
  unicode-bidi: plaintext;
  text-align: right;
}

.pm-pattern {
  direction: rtl;
  text-align: right;
  font-weight: 900;
}

.pm-pattern-stack {
  display: grid;
  gap: 4px;
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  max-width: 100%;
}

.pm-pattern-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.pm-pattern-label {
  color: #60737c;
  font-family: "Tahoma", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.pm-arabic-break-text {
  direction: inherit;
  unicode-bidi: plaintext;
  display: inline;
  text-align: inherit;
}




.pm-pattern-token,
.pm-break-indexes,
.pm-percent-token,
.pm-pattern-separator,
.pm-break-summary bdi {
  direction: ltr;
  unicode-bidi: bidi-override;
  display: inline-block;
  font-family: Consolas, "Courier New", monospace;
}

.pm-pattern-token {
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-align: right;
}

.pm-pattern-separator {
  margin: 0 6px;
  color: #7b8f97;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.pm-break-hit {
  color: inherit;
  background: rgba(196, 61, 47, 0.08);
  border: 0;
  border-bottom: 2px solid rgba(196, 61, 47, 0.35);
  border-radius: 0;
  padding: 0 1px;
  box-shadow: none;
}

.pm-break-hit-text {
  font-weight: 900;
  direction: inherit;
  unicode-bidi: normal;
  display: inline;
}

.pm-verse-line {
  display: block;
}

