/* Quiet Stanza — Settings → Handwriting style.
   The style you work towards, shown written out; the others practised alongside it; their
   levels; and the catalogue, with a style previewed on the setup sample. */

/* ═══ the style you work towards ═══ */
.hand-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 8px 24px;
  align-items: center;
  max-width: 820px;
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
  border-left: 3px solid var(--chosen);
  border-radius: var(--radius-card);
}
.hand-main-sample {
  margin: 0;
  font-size: 28px;
  line-height: 1.55;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.hand-main-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}
.hand-main-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
}
.hand-card-role {
  margin: 2px 0 10px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* A style's level from its photographed pages: five pips and a line. */
.hand-level { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hand-level-text { font-size: 12.5px; color: var(--text-secondary); }
.mastery-pips { display: flex; gap: 5px; }
.mastery-pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}
.mastery-pip.is-lit { background: var(--gold); }

/* ═══ also practising ═══ */
.hand-others {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-width: 820px;
  border-top: 1px solid var(--sheet-edge);
}
.hand-other {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto auto;
  align-items: center;
  gap: 6px 20px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--sheet-edge);
}
.hand-other-name { font-size: 20px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.hand-other-actions { display: inline-flex; gap: 14px; font-size: 13px; }
.hand-card-remove { color: var(--text-secondary); }
.hand-card-remove:hover { color: var(--wax); }
.hand-is-journal {
  align-self: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--chosen);
}

/* ═══ the catalogue ═══ */
.hand-browse {
  max-width: 960px;
  padding-top: 20px;
  border-top: 1px solid var(--sheet-edge);
}
.hand-browse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hand-browse-head .section-title:focus { outline: none; }
.hand-browse-head .section-title:focus-visible { outline: 2px solid var(--chosen); outline-offset: 4px; }

/* The sample shows a catalogue face without swapping the journal --hand. */
.setup-sample.learning-sample .setup-sample-text {
  font-family: var(--learning-hand, var(--hand));
}
.learning-hand-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
  max-width: 920px;
  margin-top: 18px;
}
.learning-hand-preview { position: sticky; top: 16px; }
.learning-hand-preview .setup-sample { margin-top: 0; max-width: none; }
.learning-hand-meta { margin: 8px 0 0; }
.learning-hand-desc {
  margin: 6px 0 0;
  max-width: 28rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.45;
}
.learning-chip-row {
  margin-top: 8px;
  max-height: min(52vh, 420px);
}

@media (max-width: 780px) {
  .hand-main { grid-template-columns: 1fr; }
  .hand-other { grid-template-columns: 1fr auto; }
  .hand-other-actions { grid-column: 1 / -1; }
  /* On a phone the sample comes first, above the list it previews, and stays in view. */
  .learning-hand-layout { grid-template-columns: 1fr; }
  .learning-hand-preview { order: -1; position: sticky; top: 0; z-index: 2; background: var(--paper); padding-bottom: 8px; }
}

/* Under a sample: the tracing guides, on or off, for a style that has them. */
.guides-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
}
.guides-check input { accent-color: var(--chosen); margin: 0; }
