.mtt-ch-sort { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-block: 1.5rem; }
.mtt-ch-sort a { text-underline-offset: .2em; padding-block: .5rem; }
.mtt-ch-sort [aria-current="true"] { font-weight: 700; text-decoration-thickness: .15em; }
.mtt-ch-featured {
  --mtt-ch-featured-accent: var(--mtt-ch-accent, var(--mtt-ch-theme-accent, currentColor));
  color: var(--mtt-ch-text, var(--mtt-ch-theme-text, inherit));
  background: var(--mtt-ch-featured-surface, color-mix(in srgb, var(--mtt-ch-featured-accent) 18%, var(--mtt-ch-surface, var(--mtt-ch-theme-surface, Canvas))));
  border: 1px solid color-mix(in srgb, var(--mtt-ch-featured-accent) 45%, transparent);
  border-radius: var(--mtt-ch-radius, .5rem);
  padding: clamp(1rem, 3vw, 2rem);
  margin-block: 1.5rem;
  font-family: var(--mtt-ch-font-family, inherit);
}
.mtt-ch-featured .mtt-ch-label { display: inline-flex; align-items: center; margin: 0 0 1rem; padding: .35rem .75rem; border-radius: 2rem; background: var(--mtt-ch-accent, var(--mtt-ch-theme-accent, ButtonFace)); color: var(--mtt-ch-accent-text, var(--mtt-ch-theme-accent-text, ButtonText)); font: inherit; font-size: .85em; font-weight: 600; line-height: 1.4; }
.mtt-ch-featured .mtt-ch-featured-author { margin-block: 0 .75rem; font-weight: 600; }
.mtt-ch-featured > a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: .2em; }
.mtt-ch-featured blockquote { padding: 0; border: 0; color: inherit; font: inherit; }
.mtt-ch-featured blockquote > :first-child { margin-top: 0; }
.mtt-ch-featured blockquote { margin-inline: 0; }
.mtt-ch-label { font-weight: 700; }
.mtt-ch-sort a:focus-visible, .mtt-ch-featured a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.mtt-ch-helpful { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-block: 1rem; }
/* Native inputs stay visible and usable with or without JavaScript. */
.mtt-ch-helpful { gap: .4rem; }
.mtt-ch-helpful button[aria-pressed="true"] { border-color: currentColor; background: color-mix(in srgb, currentColor 8%, transparent); }
.mtt-ch-thumb { flex: 0 0 auto; }
.mtt-ch-helpful .mtt-ch-vote-clear { font-size: .8em; text-decoration: underline; }
.mtt-ch-helpful-label, .mtt-ch-vote-status { font-size: .85em; }
.mtt-ch-photo-field { min-width: 0; margin-block: 1.25rem; padding: 1rem; border: 1px solid currentColor; border-radius: .35rem; }
.mtt-ch-photo-field legend { padding-inline: .3rem; font: inherit; font-weight: 600; }
.mtt-ch-photo-field p { font-size: .875em; margin-block: 0 .75rem; }
.mtt-ch-photo-field input { max-width: 100%; box-sizing: border-box; }
.mtt-ch-photo-field label { display: block; margin-block: .75rem .35rem; text-transform: none; }
.mtt-ch-photo-preview, .mtt-ch-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
.mtt-ch-photo-preview img, .mtt-ch-photos img { width: 100px; height: 100px; object-fit: cover; border-radius: .25rem; display: block; }
.mtt-ch-photos a:focus-visible, .mtt-ch-photo-field input:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mtt-ch-live { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mtt-ch-sort a { scroll-margin-top: 6rem; }
@media (prefers-reduced-motion: reduce) { .mtt-ch-sort a { scroll-behavior: auto; } }

/* Keep FilePond's layout intact inside opinionated theme comment forms. */
.mtt-ch-photo-field .filepond--root { font: inherit; margin: .75rem 0; }
.mtt-ch-photo-field .filepond--panel-root { background: color-mix(in srgb, currentColor 4%, transparent); border: 1px dashed currentColor; border-radius: .5rem; }
.mtt-ch-photo-field .filepond--drop-label { min-height: 120px; color: inherit; }
.mtt-ch-photo-field .filepond--drop-label label { margin: 0; padding: 1.5rem 1rem; font: inherit; text-transform: none; letter-spacing: normal; }
.mtt-ch-photo-field .filepond--label-action { text-decoration: underline; text-underline-offset: .2em; }
.mtt-ch-photo-field .filepond--file-action-button { min-width: 44px; min-height: 44px; padding: 0; margin: 0; box-shadow: none; }
.mtt-ch-photo-field .filepond--file-action-button:focus-visible, .mtt-ch-photo-field .filepond--label-action:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mtt-ch-photo-field .filepond--file-info, .mtt-ch-photo-field .filepond--file-status { font-family: inherit; }
.mtt-ch-photo-field .mtt-ch-photo-preview:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .mtt-ch-photo-field .filepond--root * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.mtt-ch-photo-field .filepond--root:focus-within { outline: 2px solid currentColor; outline-offset: 4px; border-radius: .5rem; }

/* Review photos stay on the page with a visible dismissal control. */
html.mtt-ch-photo-open { overflow: hidden; }
dialog.mtt-ch-photo-dialog { box-sizing: border-box; width: 48rem; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); margin: auto; padding: 1rem; border: 0; border-radius: .5rem; background: #fff; color: #222; overflow: auto; }
dialog.mtt-ch-photo-dialog::backdrop { background: rgb(0 0 0 / .8); }
dialog.mtt-ch-photo-dialog > img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 8rem); margin: auto; object-fit: contain; }
dialog.mtt-ch-photo-dialog > img[hidden] { display: none; }

.mtt-ch-gallery { margin-block: 1.5rem 2rem; min-width: 0; }
.mtt-ch-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.mtt-ch-gallery-heading h3 { margin: 0; scroll-margin-top: 8rem; }
.mtt-ch-carousel-controls { display: flex; gap: .5rem; }
.mtt-ch-carousel-controls[hidden], .mtt-ch-photo-details[hidden] { display: none; }
.mtt-ch-gallery a:focus-visible, .mtt-ch-gallery button:focus-visible, .mtt-ch-photo-grid:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mtt-ch-photo-grid { display: flex; gap: .75rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 4px 4px .75rem; scrollbar-width: thin; }
.mtt-ch-photo-review { flex: 0 0 clamp(160px, 28%, 230px); min-width: 0; scroll-snap-align: start; }
.mtt-ch-photo-cover { position: relative; overflow: hidden; border-radius: .4rem; aspect-ratio: 4 / 5; }
.mtt-ch-photo-cover .mtt-ch-photos { display: block; height: 100%; margin: 0; }
.mtt-ch-photo-cover .mtt-ch-photos a { display: block; width: 100%; height: 100%; }
.mtt-ch-photo-cover .mtt-ch-photos a:focus-visible { outline-offset: -4px; outline-color: #fff; box-shadow: inset 0 0 0 6px #222; }
.mtt-ch-photo-cover .mtt-ch-photos a:not(:first-child) { display: none; }
.mtt-ch-photo-cover .mtt-ch-photos img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.mtt-ch-photo-stars { position: absolute; bottom: .75rem; left: 50%; transform: translateX(-50%); padding: .35rem .6rem; border-radius: 1rem; background: #fff; color: #222; font: 18px/1 sans-serif; letter-spacing: .1em; white-space: nowrap; pointer-events: none; }
.mtt-ch-photo-pagination { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; }
.mtt-ch-photo-pagination a, .mtt-ch-review-link { display: inline-flex; align-items: center; min-height: 44px; }
.mtt-ch-photo-navigation { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .75rem; }
.mtt-ch-photo-navigation[hidden], .mtt-ch-dialog-review[hidden] { display: none; }
dialog.mtt-ch-photo-dialog:has(.mtt-ch-photo-navigation:not([hidden])) > img { max-height: calc(100dvh - 14rem); }
.mtt-ch-photo-navigation button:focus-visible, .mtt-ch-dialog-review:focus-visible { outline: 2px solid #222; outline-offset: 3px; }
.mtt-ch-dialog-review { display: inline-flex; align-items: center; min-height: 44px; color: #222; }

.mtt-ch-photo-context { max-width: 38rem; font: 1rem/1.5 sans-serif; }
.mtt-ch-photo-context p { margin-block: .5rem; }
.mtt-ch-photo-context .mtt-ch-photo-author { font-weight: 600; }
dialog.mtt-ch-photo-dialog:has(.mtt-ch-photo-context:not([hidden])) > img { max-height: min(55dvh, 600px); }
@media (max-width: 480px) {
  .mtt-ch-photo-review { flex-basis: 62%; }
  .mtt-ch-photo-navigation { gap: .4rem; font-size: .85rem; }
  .mtt-ch-photo-navigation button { padding: .5rem; }
}

dialog.mtt-ch-photo-dialog > img { width: 100%; height: 50dvh; min-height: 120px; object-fit: contain; }

/* One compact review hub: summary, reader media, and discovery tools. */
.mtt-ch-hub { --mtt-ch-line: color-mix(in srgb, currentColor 18%, transparent); padding: 1.5rem; border: 1px solid var(--mtt-ch-line); border-radius: .75rem; background: color-mix(in srgb, Canvas 85%, transparent); margin-block: 1.5rem; }
.mtt-ch-hub .mtt-ch-gallery { margin-block: 1.5rem; }
.mtt-ch-hub .mtt-ch-sort { margin-block: 1rem 0; padding-top: 1rem; border-top: 1px solid var(--mtt-ch-line); gap: .5rem; }
.mtt-ch-hub .mtt-ch-sort a { padding: .5rem .75rem; min-height: 44px; box-sizing: border-box; text-decoration: none; border-radius: 2rem; font-size: .9rem; }
.mtt-ch-hub .mtt-ch-sort a[aria-current] { background: color-mix(in srgb, currentColor 10%, transparent); }
.mtt-ch-rating-summary { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1fr); gap: 2rem; align-items: center; padding-bottom: 1.25rem; border-bottom: 1px solid var(--mtt-ch-line); }
.mtt-ch-average { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; }
.mtt-ch-average strong { font-size: 3.5rem; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.mtt-ch-rating-bars { display: grid; gap: .1rem; }
.mtt-ch-rating-bars a { display: grid; grid-template-columns: 2rem 1fr 2rem; align-items: center; gap: .65rem; min-height: 28px; font-size: .85rem; text-decoration: none; }
.mtt-ch-rating-bars a[aria-current] { font-weight: 700; outline: 1px solid currentColor; outline-offset: 2px; }
.mtt-ch-bar { height: 6px; border-radius: 6px; background: var(--mtt-ch-line); overflow: hidden; }
.mtt-ch-bar > span { display: block; height: 100%; background: currentColor; border-radius: inherit; }
.mtt-ch-hub .mtt-ch-gallery-heading h3 { font-size: 1.1rem; font-family: inherit; font-weight: 600; line-height: 1.3; }
.mtt-ch-filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.mtt-ch-hub > .mtt-ch-rating-summary + .mtt-ch-filters { padding-block-start: 1rem; }
.mtt-ch-filters label { display: flex; flex-direction: column; gap: .35rem; font-size: .75rem; font-weight: 600; flex: 1 1 100px; }
.mtt-ch-filters .mtt-ch-search { flex: 2 1 220px; }
.mtt-ch-filters input[type=search], .mtt-ch-filters select { width: 100%; min-width: 0; margin: 0; min-height: 44px; border: 1px solid var(--mtt-ch-line); border-radius: .35rem; background: transparent; color: inherit; font-family: inherit; font-size: .9rem; font-weight: 400; line-height: 1.3; padding: .6rem .7rem; box-sizing: border-box; }
/* Inset the decorative chevron while retaining the native select interaction. */
.mtt-ch-filters label:has(select) { position: relative; flex-basis: 150px; }
.mtt-ch-filters select { appearance: none; padding-inline-end: 2.5rem; }
.mtt-ch-filters label:has(select)::after { content: ""; position: absolute; inset-inline-end: 1rem; bottom: 1.15rem; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); pointer-events: none; }
@media (forced-colors: active) {
  .mtt-ch-filters select { appearance: auto; }
  .mtt-ch-filters label:has(select)::after { content: none; }
}
.mtt-ch-results { font-size: .85rem; margin-block: 1rem 0; scroll-margin-top: 8rem; }
.mtt-ch-results a { margin-inline-start: .75rem; }
.mtt-ch-hub :is(a,button,input,select):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mtt-ch-tips { font-size: .85rem; line-height: 1.5; margin-block: .35rem 1rem; }
.mtt-ch-video-field { margin-block: 1rem; padding: .75rem; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: .4rem; }
.mtt-ch-video-field summary { cursor: pointer; min-height: 32px; }
.mtt-ch-video-field p { font-size: .85rem; }
.mtt-ch-caption-field[hidden] { display: none; }
.mtt-ch-video-link { position: relative; }
.mtt-ch-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: #222d; pointer-events: none; }
dialog.mtt-ch-photo-dialog > video { display: block; width: 100%; height: 50dvh; object-fit: contain; background: #111; }
dialog.mtt-ch-photo-dialog > video[hidden] { display: none; }
@media (max-width: 600px) {
  .mtt-ch-hub { padding: 1rem; }
  .mtt-ch-rating-summary { gap: 1rem; grid-template-columns: 100px minmax(0, 1fr); }
  .mtt-ch-average strong { font-size: 2.8rem; }
  .mtt-ch-filters .mtt-ch-search { flex-basis: 100%; }
}

/* Theme-owned design tokens; neutral fallbacks also support classic themes. */
.mtt-ch-hub,
.mtt-ch-photo-field,
dialog.mtt-ch-photo-dialog {
  font-family: var(--mtt-ch-font-family, inherit);
  color: var(--mtt-ch-text, var(--mtt-ch-theme-text, inherit));
}
.mtt-ch-hub { background: var(--mtt-ch-surface, var(--mtt-ch-theme-surface, color-mix(in srgb, Canvas 85%, transparent))); border-radius: var(--mtt-ch-radius, .75rem); }
.mtt-ch-hub .mtt-ch-sort a[aria-current],
.mtt-ch-photo-field .filepond--panel-root { background: var(--mtt-ch-upload-surface, color-mix(in srgb, currentColor 4%, transparent)); }
dialog.mtt-ch-photo-dialog { background: var(--mtt-ch-surface, var(--mtt-ch-theme-surface, #fff)); color: var(--mtt-ch-text, var(--mtt-ch-theme-text, #222)); border-radius: var(--mtt-ch-radius, .5rem); }
dialog.mtt-ch-photo-dialog :is(.mtt-ch-photo-close, .mtt-ch-photo-navigation button) { background: var(--mtt-ch-surface, var(--mtt-ch-theme-surface, #fff)); color: var(--mtt-ch-text, var(--mtt-ch-theme-text, #222)); border-color: currentColor; font-family: inherit; }
.mtt-ch-photo-context { font-family: inherit; }
.mtt-ch-dialog-review { color: inherit; }
.mtt-ch-photo-stars { background: var(--mtt-ch-surface, var(--mtt-ch-theme-surface, #fff)); color: var(--mtt-ch-text, var(--mtt-ch-theme-text, #222)); }
.mtt-ch-caption-field[hidden] { display: none; }

/* Shared controls: primary (search), outline (viewer/arrows), quiet (votes/sorts).
 * Deliberately reset theme button effects; branding enters through design tokens.
 * FilePond keeps its own component controls and layout.
 */
:is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: .6rem 1rem;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: var(--mtt-ch-radius, .5rem);
  background: var(--mtt-ch-surface, var(--mtt-ch-theme-surface, transparent));
  color: inherit;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  font-family: var(--mtt-ch-font-family, inherit);
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
:is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button::before,
:is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button::after { content: none; }
:is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button:hover { border-color: currentColor; box-shadow: none; transform: none; }
:is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
:is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button:is(:disabled, [aria-disabled="true"]) { opacity: .4; cursor: default; }
.mtt-ch-hub .mtt-ch-filters button { border-color: transparent; background: var(--mtt-ch-accent, var(--mtt-ch-theme-accent, ButtonFace)); color: var(--mtt-ch-accent-text, var(--mtt-ch-theme-accent-text, ButtonText)); }
.mtt-ch-hub .mtt-ch-carousel-controls button { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex: 0 0 44px; }
.mtt-ch-helpful button { background: transparent; border-color: transparent; padding: .4rem .6rem; }
.mtt-ch-hub .mtt-ch-sort a { display: inline-flex; align-items: center; justify-content: center; line-height: 1.3; }
dialog.mtt-ch-photo-dialog .mtt-ch-photo-close { position: sticky; top: 0; margin: 0 0 .75rem auto; width: fit-content; display: flex; z-index: 1; }
.mtt-ch-photo-grid.mtt-ch-draggable { scroll-snap-type: x proximity; cursor: grab; }
.mtt-ch-photo-grid.mtt-ch-dragging,
.mtt-ch-photo-grid.mtt-ch-coasting { scroll-snap-type: none; scroll-behavior: auto; }
.mtt-ch-photo-grid.mtt-ch-dragging { cursor: grabbing; user-select: none; }
.mtt-ch-photo-grid.mtt-ch-draggable a { cursor: inherit; -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) {
  :is(.mtt-ch-hub, .mtt-ch-helpful, .mtt-ch-photo-dialog, .mtt-ch-editorial) button { transition: none; }
}

/* Reuse the same media links and viewer in the featured card. */
.mtt-ch-featured .mtt-ch-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 150px)); gap: .75rem; margin-block: 1rem; }
.mtt-ch-featured .mtt-ch-photos a { display: block; aspect-ratio: 1; min-width: 0; }
.mtt-ch-featured .mtt-ch-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--mtt-ch-radius, .5rem); }

.mtt-ch-editorial { margin-block: .75rem; }

/* Topic links share the sort-link interaction and theme tokens. */
.mtt-ch-topics { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-block: .75rem; font-size: .9rem; }
.mtt-ch-topics ul { display: flex; flex-wrap: wrap; gap: .35rem .75rem; list-style: none; padding: 0; margin: 0; }
.mtt-ch-topics li { margin: 0; padding: 0; }
.mtt-ch-topics a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .35rem; color: inherit; text-underline-offset: .2em; overflow-wrap: anywhere; }
.mtt-ch-topics [aria-current="true"] { font-weight: 700; text-decoration-thickness: .15em; }
.mtt-ch-topics a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Keep upload guidance compact and reveal descriptions after photo selection. */
.mtt-ch-description-field[hidden] { display: none; }
.mtt-ch-photo-field .mtt-ch-upload-requirements { margin-block: .5rem 1rem; font-size: .875em; }
.mtt-ch-photo-field .mtt-ch-upload-requirements summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.mtt-ch-photo-field .mtt-ch-upload-requirements summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mtt-ch-photo-field .mtt-ch-upload-requirements p { margin-block: .5rem 0; font-size: inherit; }
.mtt-ch-photo-field .mtt-ch-description-field label { margin-bottom: .25rem; }
.mtt-ch-photo-field .mtt-ch-description-field input { width: 100%; }

.mtt-ch-tips { display: block; margin-block: .35rem; font-size: .875em; }

/* Indicate comment refreshes without moving content or dimming the writing form. */
.mtt-ch-comment-list { transition: opacity 120ms ease; }
:is(.wp-block-comments, .comments-area, [id="comments"])[aria-busy="true"] .mtt-ch-comment-list:not(:has(#respond)),
:is(.wp-block-comments, .comments-area, [id="comments"])[aria-busy="true"] .mtt-ch-comment-list:has(#respond) :is([id^="div-comment-"], .wp-block-comment-content):not(:has(#respond)) { opacity: .65; }
@media (prefers-reduced-motion: reduce) {
  .mtt-ch-comment-list { transition: none; }
}
