.custom-observer-dialog { width: min(46rem, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
.custom-observer-dialog[open] { display: flex; flex-direction: column; }
.custom-observer-heading { display: flex; flex: none; align-items: center; gap: 6px; padding: 8px 12px; }
.custom-observer-heading h2 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.custom-observer-controls { display: flex; flex: none; align-items: center; gap: 2px; margin-left: auto; }
.custom-observer-heading .icon-button { flex: none; width: 36px; min-height: 36px; }
.custom-observer-body { container-type: inline-size; min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 4px 12px 12px; scroll-padding: 10px; }
.custom-observer-body:focus-visible { outline-offset: -3px; }
.custom-observer-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.custom-observer-puzzle-title { font-size: .9375rem; font-weight: 600; line-height: 1.45; }
.custom-observer-context { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; margin-bottom: 8px; }
.custom-observer-context > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.custom-observer-target-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; min-width: 0; }
.custom-observer-target { min-width: 36px; min-height: 32px; max-width: 100%; padding: 4px 5px; font-size: .8125rem; overflow-wrap: anywhere; color: var(--accent); }
.custom-observer-share { width: 32px; min-height: 32px; flex: none; padding: 6px; }
.custom-observer-share-link { margin-bottom: 8px; }
.custom-observer-error { color: var(--error); }
.custom-observer-retry { margin-bottom: 8px; }
.custom-observer-group { margin: 0; }
.custom-observer-group + .custom-observer-group { margin-top: 12px; }
.custom-observer-group > summary { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 5px 0; border-radius: 4px; font-size: .875rem; font-weight: 600; cursor: pointer; list-style: none; }
.custom-observer-group > summary::-webkit-details-marker { display: none; }
.custom-observer-group > summary::before { content: '›'; width: 10px; flex: none; color: var(--muted); font-size: 1.1rem; line-height: 1; text-align: center; }
.custom-observer-group[open] > summary::before { transform: rotate(90deg); }
.custom-observer-group-count { color: var(--muted); font-size: .75rem; font-weight: 400; }
.custom-observer-table { --review-count-width: 3.5rem; --review-best-width: 5.25rem; width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .875rem; }
.custom-observer-column-player { width: 32%; }
.custom-observer-column-guesses { width: var(--review-count-width); }
.custom-observer-column-best { width: var(--review-best-width); }
.custom-observer-table :is(th, td) { border: 0; padding: 4px 0; vertical-align: middle; }
.custom-observer-table th { position: static; color: var(--muted); background: transparent; font-size: .75rem; font-weight: 500; text-align: left; }
.custom-observer-table th.custom-observer-heading-best { text-align: right; padding-right: 8px; }
.custom-observer-table th.custom-observer-heading-word { padding-left: 8px; }
.custom-observer-table tbody tr { background: transparent; }
.custom-observer-table .custom-observer-player-cell { padding-right: 8px; }
.custom-observer-table .custom-observer-word-cell { padding-left: 8px; }
.custom-observer-player { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 36px; padding: 5px 0; text-align: left; font-size: .875rem; font-weight: 600; }
.custom-observer-player > :last-child { min-width: 0; overflow-wrap: anywhere; }
.custom-observer-state { flex: none; width: 13px; text-align: center; color: var(--muted); }
.custom-observer-row[data-status=finished] .custom-observer-state { color: var(--success); }
.custom-observer-row[data-status=dnf] .custom-observer-state { color: var(--error); }
.custom-observer-row-progress .guess-progress { display: block; width: 100%; max-width: none; }
.custom-observer-row-progress .guess-progress-metrics { display: grid; grid-template-columns: var(--review-count-width) minmax(0, 1fr); width: 100%; gap: 0; }
.custom-observer-row-progress .guess-progress-count { text-align: left; }
.custom-observer-row-progress .guess-progress-temperature { text-align: right; padding-right: 8px; }
.custom-observer-row-word { display: block; min-width: 0; }
.custom-observer-word-cell .guess-progress-word { display: block; overflow-wrap: anywhere; font-size: .875rem; }
.custom-observer-row-reveal { display: block; width: 100%; min-height: 36px; padding: 4px 0; text-align: left; color: var(--accent); background: transparent; border-color: transparent; }
.custom-observer-detail-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.custom-observer-detail-heading h3 { min-width: 0; margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.custom-observer-detail-heading h3:focus-visible { outline-offset: 1px; }
.custom-observer-detail-heading .result-player-select { flex: 1 1 12rem; min-width: 0; width: auto; max-width: 100%; }
.custom-observer-player-status { margin-left: auto; }
.custom-observer-review-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.custom-observer-review-tools .guess-sort button { min-height: 32px; font-size: .75rem; }
.custom-observer-initial, .custom-observer-exploration { margin: 12px 0; }
.custom-observer-initial h4, .custom-observer-exploration h4 { margin: 0 0 4px; font-size: .8125rem; }
.custom-observer-exploration { border-top: 1px solid var(--line); padding-top: 12px; }
.custom-observer-history-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.custom-observer-history-heading h4 { min-width: 0; margin: 0; font-size: .8125rem; font-weight: 600; }
.custom-observer-body .custom-observer-updated { margin: 10px 0 0; font-size: .6875rem; }
@container (max-width: 25rem) {
  .custom-observer-table { --review-count-width: 3rem; --review-best-width: 4.75rem; }
  .custom-observer-player { font-size: .8125rem; }
  .custom-observer-word-cell .guess-progress-word { font-size: .8125rem; }
  .custom-observer-row-progress .guess-progress { font-size: .8125rem; }
  .custom-observer-review-tools .sort-label { display: none; }
  .custom-observer-review-tools .guess-sort button { width: var(--segment-height); }
}
@container (max-width: 18rem) {
  .custom-observer-table { --review-count-width: 2.6rem; --review-best-width: 4.3rem; display: block; }
  .custom-observer-table :is(colgroup, col) { display: none; }
  .custom-observer-table :is(thead, tbody) { display: block; }
  .custom-observer-table tr { display: grid; grid-template-columns: var(--review-count-width) var(--review-best-width) minmax(0, 1fr); align-items: center; }
  .custom-observer-table .custom-observer-heading-player, .custom-observer-table .custom-observer-player-cell { grid-column: 1 / -1; }
  .custom-observer-table .custom-observer-row-progress { grid-column: 1 / 3; }
  .custom-observer-table .custom-observer-word-cell { grid-column: 3; }
  .custom-observer-player { min-height: 32px; }
}
@media (pointer: coarse) {
  .custom-observer-dialog button, .custom-observer-group > summary { min-height: 44px; }
  .custom-observer-heading .icon-button { width: 44px; }
}

/* Public progress omits the author's private word column. Completed players
   use the same name buttons to open their authorized selected history. */
.custom-observer-dialog[data-audience=public] { width: min(32rem, calc(100% - 24px)); }
.custom-observer-dialog[data-audience=public] .custom-observer-table { display: table; }
.custom-observer-dialog[data-audience=public] .custom-observer-column-player { width: auto; }
.custom-observer-dialog[data-audience=public] .custom-observer-table colgroup { display: table-column-group; }
.custom-observer-dialog[data-audience=public] .custom-observer-table col { display: table-column; }
.custom-observer-dialog[data-audience=public] .custom-observer-table thead { display: table-header-group; }
.custom-observer-dialog[data-audience=public] .custom-observer-table tbody { display: table-row-group; }
.custom-observer-dialog[data-audience=public] .custom-observer-table tr { display: table-row; }
.custom-observer-dialog[data-audience=public] .custom-observer-player { font-weight: 500; }
.custom-observer-dialog[data-audience=public] .custom-observer-row[data-self=true] .custom-observer-player { font-weight: 700; }
.custom-observer-dialog[data-audience=public] :is(.custom-observer-heading-best, .guess-progress-temperature) { padding-right: 0; }
@container (max-width: 14rem) {
  .custom-observer-dialog[data-audience=public] .custom-observer-table { display: block; }
  .custom-observer-dialog[data-audience=public] .custom-observer-table :is(colgroup, col) { display: none; }
  .custom-observer-dialog[data-audience=public] .custom-observer-table :is(thead, tbody) { display: block; }
  .custom-observer-dialog[data-audience=public] .custom-observer-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .custom-observer-dialog[data-audience=public] .custom-observer-table :is(.custom-observer-heading-player, .custom-observer-player-cell, .custom-observer-row-progress) { grid-column: 1 / -1; }
  .custom-observer-dialog[data-audience=public] .custom-observer-table .custom-observer-player-cell { padding-right: 0; }
  .custom-observer-dialog[data-audience=public] .custom-observer-row-progress .guess-progress-metrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
