/* The owner's check of the characters by shape (reader/shapes.html, js/shapes.js): layout only; colours from the theme. */
.sh-main { max-width: 76rem; }
.sh-bar { position: sticky; top: 4.2rem; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .75rem; margin-bottom: .75rem; }
.sh-count { font-variant-numeric: tabular-nums; }
.sh-help summary { cursor: pointer; }
.sh-message:empty { display: none; }
.sh-group { padding: .6rem .75rem .5rem; margin-bottom: .75rem; scroll-margin-top: 8rem; }
.sh-group.is-last { outline: 2px solid color-mix(in srgb, var(--accent, currentColor) 45%, transparent); }
.sh-node + .sh-node, .sh-kids { margin-top: .5rem; }
.sh-kids { padding-left: .9rem; border-left: 3px solid color-mix(in srgb, var(--accent, currentColor) 35%, transparent); }
.sh-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.sh-size { min-width: 2.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-new { font-size: .7rem; padding: .05rem .4rem; border-radius: 1rem; background: var(--accent, currentColor); color: #fff; }
.sh-head input.form-control { width: 7.5rem; font-family: var(--font-cjk), serif; font-size: 1.15rem; padding: .1rem .4rem; }
.sh-head input.sh-m { width: 6rem; font-size: 1rem; }
.sh-prev { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; font-family: var(--font-cjk), serif; font-size: 1.6rem; line-height: 1; }
.sh-prev svg { width: 1.6rem; height: 1.6rem; color: var(--accent, currentColor); }
.sh-head .form-check { margin: 0 0 0 .2rem; }
.sh-node.is-done > .sh-toks { opacity: .55; }
.sh-node.is-done > .sh-head .sh-size { color: var(--accent, currentColor); }
.sh-toks { display: flex; flex-wrap: wrap; gap: 3px; }
.sh-tok { touch-action: manipulation; position: relative; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: .3rem; background: #eef0f0; overflow: hidden; cursor: pointer; }
.sh-tok img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sh-tok.on { border-color: var(--accent, #b8262e); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #b8262e) 35%, transparent); }
.sh-tok.on::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent, #b8262e) 18%, transparent); }
.sh-tok:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.sh-tools { display: flex; gap: .3rem; margin-top: .35rem; }
.sh-tools .btn { min-width: 2.2rem; font-weight: 700; }
.sh-empty { font-size: .85rem; color: var(--muted, currentColor); }
@media (max-width: 575.98px) { .sh-tok { width: 46px; height: 46px; } .sh-head input.form-control { width: 6rem; } .sh-bar { top: 3.6rem; } }
.sh-node.no-char > .sh-head input.sh-g { border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192, 57, 43, .25); }   /* done, but no character yet: it stays when sending */
.sh-node.no-char > .sh-head .sh-size { color: #c0392b; }
.sh-to-empty { color: #c0392b; }
.sh-reads { margin-top: .3rem; color: var(--muted, currentColor); }   /* the readings of the group (Durand), a help only */
.sh-read { padding: 0 .15rem; border: 0; border-radius: .25rem; background: none; color: inherit; font: inherit; cursor: pointer; }
.sh-read:hover { text-decoration: underline; }
.sh-read.on { background: color-mix(in srgb, var(--accent, #b8262e) 18%, transparent); color: var(--ink, currentColor); }
/* the search (a dialog): every place of readings / characters in the transcription */
.sh-dlg { width: min(46rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 3rem); padding: .9rem 1rem; border: 1px solid var(--line, #ccc); border-radius: .8rem; background: var(--paper, #fff); color: var(--ink, inherit); }
.sh-dlg::backdrop { background: rgba(0, 0, 0, .35); }
.sh-dlg-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem; position: sticky; top: -.9rem; background: var(--paper, #fff); padding: .2rem 0; z-index: 1; }
.sh-dlg-head input { flex: 1; min-width: 0; }
.sh-res + .sh-res { margin-top: .9rem; }
.sh-res-head { font-size: 1rem; margin: 0 0 .3rem; }
.sh-res-term { font-weight: 700; }
.sh-res-term.han { font-family: var(--font-cjk), serif; font-size: 1.3rem; font-weight: 400; }
.sh-res-list { margin: 0; padding-left: 1.6rem; }
.sh-res-list li { margin-bottom: .35rem; }
.sh-res-where { display: inline-block; min-width: 5.5rem; margin-right: .4rem; vertical-align: top; }
.sh-res-line { display: inline-flex; flex-wrap: wrap; gap: .2rem .25rem; }
.sh-res-tok { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.sh-res-tok { padding: 2px; border-radius: .3rem; }
.sh-res-tok.hit { background: color-mix(in srgb, var(--accent, #b8262e) 28%, transparent); }
.sh-res-img { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: .2rem; background: #eef0f0; }
.sh-res-q { font-size: .85rem; }
/* the readings (reader/readings.html): the tiles are Durand's red Quốc Ngữ, wider than high */
[data-mode="reading"] .sh-tok { width: 112px; height: 48px; background: #f3f1ee; }
[data-mode="reading"] .sh-res-img { width: 72px; height: 32px; }
[data-mode="reading"] .sh-head input.sh-g, [data-mode="reading"] .sh-head input.sh-m { width: 9rem; font-family: inherit; font-size: 1rem; }
@media (max-width: 575.98px) { [data-mode="reading"] .sh-tok { width: 92px; height: 40px; } [data-mode="reading"] .sh-head input.sh-g, [data-mode="reading"] .sh-head input.sh-m { width: 7.5rem; } }
