/* XVideos-reference tube layout — local demo skin only. */
:root {
  --bg: #fff;
  --bg2: #fff;
  --text: #000;
  --mute: #555;
  --line: #eee;
  --panel: #f7f7f7;
  --accent: #de2600;
  --accent2: #de2600;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.tube {
  padding: 4px 8px 8px;
  font: 12px/18px Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; }
button, input, summary { font: inherit; }
button { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.top { border: 0; }
.top, .page, .foot { max-width: 1830px; margin-inline: auto; }
.top-main {
  display: flex;
  align-items: center;
  height: 40px;
  max-width: none;
  padding: 0;
  gap: 9px;
  flex-wrap: nowrap;
}
.logo {
  flex: 0 0 auto;
  font: bold 22px/36px Arial, sans-serif;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
}
.logo i {
  color: var(--accent);
  font-style: normal;
  font-size: inherit;
  vertical-align: baseline;
  margin-right: 0;
}
.top-tools {
  order: 0;
  margin: 0;
  flex-shrink: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}
.drop { position: relative; }
.drop summary {
  list-style: none;
  cursor: pointer;
  padding: 5px;
  color: var(--text);
  white-space: nowrap;
}
.drop summary::-webkit-details-marker { display: none; }
.drop-list {
  position: absolute;
  left: 0;
  right: auto;
  top: 100%;
  z-index: 20;
  background: var(--bg);
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px #0002;
  padding: 8px;
  max-height: 65vh;
  overflow: auto;
  display: grid;
  gap: 2px;
  min-width: 140px;
}
.lang-drop { grid-template-columns: 1fr 1fr; min-width: 280px; }
.drop-list a {
  color: var(--text);
  text-decoration: none;
  padding: 5px 8px;
  white-space: nowrap;
  display: block;
}
.drop-list a:hover { color: var(--text); background: var(--panel); }
.search {
  display: flex;
  flex: 0 1 460px;
  max-width: 460px;
  margin-inline: auto;
  height: 36px;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 3px 0 0 3px;
  padding: 4px 10px;
  font: 17px/25.5px Arial, sans-serif;
}
.search button {
  width: 44px;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  background: var(--line);
  color: var(--text);
  font-size: 27px;
  cursor: pointer;
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 24px;
}
.header-actions button {
  background: none;
  border: 0;
  padding: 3px;
  font-size: 24px;
  cursor: pointer;
}
.header-actions a { color: var(--text); text-decoration: none; }
[data-search-toggle] { display: none; }

.main-nav {
  max-width: none;
  height: 50px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  flex-wrap: nowrap;
  background: linear-gradient(var(--bg), var(--panel));
  gap: 0;
}
.main-nav > a,
.main-nav > .nav-placeholder,
.main-nav > .drop {
  flex: 1;
  text-align: center;
  font-weight: 700;
  padding: 4px 3px;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}
.main-nav a:hover { color: var(--text); text-decoration: underline; }
.main-nav b {
  display: block;
  color: #777;
  font-size: 19px;
  font-weight: 400;
  height: 20px;
  line-height: 20px;
}
.main-nav .nav-placeholder:first-of-type b {
  font: bold 9px/20px Arial;
  color: var(--accent);
}
.main-nav summary { padding: 0; }
.category-list {
  grid-template-columns: repeat(3, 1fr);
  min-width: 420px;
  font-weight: 400;
}
.nav-placeholder { cursor: default; }
.main-nav .service-link[href$="/red_videos"] b {
  font: bold 9px/20px Arial, sans-serif;
  color: var(--accent);
}

.page { padding: 20px 0 0; }
.heading { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.page-head .heading,
.page-head .video-page-title {
  margin: 0;
  flex: 1 1 240px;
}
.updated-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--panel) 100%);
  color: var(--mute);
  white-space: nowrap;
  border-radius: 999px;
  line-height: 16px;
}
.updated-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0C3558;
  box-shadow: 0 0 0 3px rgba(12, 53, 88, 0.12);
}
.updated-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0C3558;
}
.updated-date {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
body.home .page > .heading { display: none; }
body.home .page-head .heading { display: none; }
body.home .page-head { display: none; }
.catalog-nav { display: none; }
.catalog-action {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin: 6px;
  color: var(--text);
  text-decoration: none;
}
.service-panel { padding: 32px 12px; min-height: 240px; }
.service-panel p { font-size: 15px; line-height: 24px; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-inline: -2px;
  gap: 0;
}
.thumb {
  min-width: 0;
  padding: 10px 2px 11px;
  text-align: center;
  color: inherit;
  text-decoration: none;
  display: block;
}
.thumb-pic {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 2px;
  background: #eee;
  overflow: hidden;
}
.thumb-pic img,
.thumb-pic svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-pic.has-cover img {
  background: #111;
}
.thumb-pic .play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  opacity: 0.92;
}
.thumb-pic .play-badge::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 13px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #fff;
}
.thumb:hover .play-badge {
  background: rgba(0, 0, 0, 0.72);
}
.thumb-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  height: 36px;
  max-height: none;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font: 14.3px/18px Arial, sans-serif;
}
.thumb:hover .thumb-title { color: var(--text); text-decoration: underline; }
.thumb-meta {
  display: block;
  height: 20px;
  overflow: hidden;
  color: var(--mute);
  font: 13px/18px Arial, sans-serif;
  padding-top: 2px;
  white-space: nowrap;
}
.thumb-dur {
  position: static;
  background: #777;
  color: #fff;
  font-size: 10.8px;
  padding: 0 3px;
  margin-right: 4px;
}
.quality {
  position: absolute;
  right: 0;
  top: 0;
  background: var(--accent);
  color: white;
  font-weight: 700;
  padding: 0 5px;
}
.clip-ok {
  position: static;
  color: #328d30;
  background: none;
  margin-left: 4px;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pager a,
.pager .page-numbers {
  padding: 7px 12px;
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  margin: 0;
}
.pager .current,
.pager a[aria-current="page"] { background: var(--accent); color: white; }
.pager a:hover { background: var(--panel); color: var(--text); }
.more {
  display: block;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 15px;
}

.video-page-title {
  font: 700 25px/32px Arial, sans-serif;
  margin: 0;
}
.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}
.watch-main { min-width: 0; }
.watch-side .thumbs { grid-template-columns: 1fr; }
.watch-side h3 { margin: 0; }
.watch a,
.tagline a { color: var(--text); }
.url-hint { display: none; }
.tagline a {
  display: inline-block;
  padding: 3px 8px;
  background: var(--panel);
  margin: 3px;
  text-decoration: none;
}
.player {
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  max-width: none;
}
.meta, .note { color: var(--mute); }
.ad-placeholder {
  height: 250px;
  background: var(--panel);
  display: grid;
  place-items: center;
  color: #999;
  font-size: 11px;
}
.related-section { margin-top: 24px; }
.related-section h3 { font-size: 18px; }
.related-section .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.foot {
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
  text-align: center;
  color: var(--mute);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin: 10px 0 4px;
}
.foot-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.foot-links a:hover { color: var(--accent, #EE9B1A); text-decoration: underline; }
.sitemap-block { margin: 18px 0 28px; text-align: left; }
.sitemap-block h2 { font-size: 18px; margin: 0 0 10px; }
.sitemap-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sitemap-list a { color: var(--text); text-decoration: none; }
.sitemap-list a:hover { color: var(--accent, #EE9B1A); text-decoration: underline; }
.sitemap-xml-link { margin-top: 12px; }
@media (max-width: 900px) {
  .sitemap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sitemap-list { grid-template-columns: 1fr; }
}
.lang-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0;
  justify-content: center;
}
.lang-bar a,
.lang-bar a:hover { color: var(--mute); text-decoration: none; font-size: 12px; }
.geo-bar { font-size: 11px; color: var(--mute); }
.empty { text-align: center; color: var(--mute); padding: 24px 0; }

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.directory-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
}
.directory-card strong {
  display: block;
  font-size: 18px;
  margin-top: 12px;
}
.directory-avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ddd;
  color: #555;
  font-size: 26px;
}

.age {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 50;
  display: grid;
  place-items: center;
}
.age[hidden] { display: none; }
.age-box {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  max-width: 420px;
  color: var(--text);
}
.age-box button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  margin-right: 10px;
  cursor: pointer;
}
.age-box a { color: var(--mute); }

html[data-theme="dark"] {
  --bg: #161616;
  --bg2: #161616;
  --text: #eee;
  --mute: #aaa;
  --line: #333;
  --panel: #242424;
  color-scheme: dark;
}

/* Topic aggregation: intro, then images, then videos */
.topic-intro {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.topic-intro-geo {
  padding: 16px 18px 18px;
}
.topic-geo-analysis {
  margin: 0 0 14px;
}
.topic-geo-title {
  margin: 0 0 12px;
  font: 700 16px/22px Arial, sans-serif;
  color: var(--text);
}
.topic-geo-sub {
  margin: 16px 0 8px;
  font: 700 13px/18px Arial, sans-serif;
  color: var(--text);
}
.topic-geo-text {
  margin: 0 0 8px;
  font: 13px/20px Arial, sans-serif;
  color: var(--text);
}
.topic-geo-direct {
  margin: 0 0 12px;
  font: 14px/22px Arial, sans-serif;
  color: var(--text);
}
.topic-geo-q {
  margin: 0 0 6px;
  font: 700 13px/18px Arial, sans-serif;
}
.topic-geo-answers,
.topic-geo-cases {
  display: grid;
  gap: 10px;
}
.topic-geo-answer-item,
.topic-geo-case {
  margin: 0;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.topic-geo-answer-item h4,
.topic-geo-case h4 {
  margin: 0 0 6px;
  font: 700 13px/18px Arial, sans-serif;
}
.topic-geo-answer-item p,
.topic-geo-case p {
  margin: 0;
  font: 13px/20px Arial, sans-serif;
  color: var(--text);
}
.topic-geo-list {
  margin: 0 0 4px;
  padding-left: 18px;
  font: 13px/20px Arial, sans-serif;
}
.topic-geo-list li {
  margin: 0 0 6px;
}
.topic-geo-limit {
  color: var(--mute);
}
.topic-blurb {
  margin: 0 0 12px;
  font: 14px/22px Arial, sans-serif;
  color: var(--text);
}
.topic-keywords {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.topic-keywords-label {
  color: var(--mute);
  font-size: 12px;
  margin-right: 4px;
}
.topic-keywords a {
  display: inline-block;
  padding: 3px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
}
.topic-keywords a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.topic-section {
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.topic-section:last-child { border-bottom: 0; margin-bottom: 8px; }
.topic-heading {
  margin: 0 0 12px;
  font: 700 18px/24px Arial, sans-serif;
  color: var(--text);
}
.topic-heading span {
  margin-left: 8px;
  font-weight: 400;
  color: var(--mute);
  font-size: 14px;
}
.topic-empty { margin: 0; color: var(--mute); font-size: 14px; }
.topic-page .topic-image-grid,
.topic-page .topic-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-inline: -2px;
}
.topic-page .topic-post-list,
.topic-page .topic-qa-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.topic-page .topic-text-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  align-items: start;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.topic-page .topic-text-col {
  min-width: 0;
}
.topic-page .topic-text-row .topic-heading {
  margin-bottom: 12px;
}
.topic-item-kw {
  display: inline-block;
  margin: 0 0 4px;
  color: var(--mute);
  font: 12px/16px Arial, sans-serif;
  font-style: normal;
  text-transform: lowercase;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-inline: -2px;
  gap: 0;
}
.image-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
  padding: 10px 2px 11px;
  text-align: center;
}
.image-pic {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
  margin-bottom: 2px;
}
.image-pic img,
.image-pic svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-card strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
  min-height: 36px;
  margin: 0;
  font: 14.3px/18px Arial, sans-serif;
  color: var(--text);
}
.image-card:hover strong { text-decoration: underline; color: var(--text); }
.post-list,
.qa-list { display: grid; gap: 8px; }
.post-row,
.qa-row {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
}
.post-row strong,
.qa-row strong {
  display: block;
  font: 700 15px/20px Arial, sans-serif;
  margin-bottom: 4px;
}
.post-row span,
.qa-row span {
  display: block;
  color: var(--mute);
  font: 13px/18px Arial, sans-serif;
}
.post-row:hover,
.qa-row:hover { background: var(--bg); }
.topic-detail { max-width: 820px; width: 100%; }
.topic-lead { color: var(--mute); font-size: 15px; line-height: 22px; }
.topic-body { font-size: 15px; line-height: 24px; }
.image-hero {
  margin: 0 0 16px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}
.image-hero img,
.image-hero svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qa-label {
  margin: 0 0 6px;
  color: var(--mute);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.geo-answer {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--bg);
  border-left: 3px solid var(--link);
  color: var(--text);
  font-size: 15px;
  line-height: 23px;
}
.geo-answer strong { color: var(--text); }
.geo-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
  margin: 0 0 14px;
  padding: 0;
}
.geo-facts > div {
  margin: 0;
  padding: 8px 10px;
  background: var(--bg);
}
.geo-facts dt {
  margin: 0;
  color: var(--mute);
  font-size: 12px;
  line-height: 16px;
}
.geo-facts dd {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}
.geo-about { margin: 16px 0; }
.geo-about h2,
.geo-faq h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}
.geo-faq { margin: 20px 0 8px; }
.geo-faq-item { margin: 0 0 14px; }
.geo-faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.geo-faq-item p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 23px;
}
.leaf-page .related-section h2,
.related-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font: 13px/18px Arial, sans-serif;
  color: var(--mute);
}
.crumbs-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.crumbs a { color: var(--text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--accent); }
.crumbs-sep { color: #bbb; }
.crumbs-current {
  color: var(--mute);
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs-back {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.crumbs-back:hover { border-color: var(--accent); color: var(--accent); }

/* Site-wide responsive */
.top-main,
.main-nav,
.page,
.foot,
.thumbs,
.image-grid,
.directory-grid,
.watch,
.topic-intro,
.post-list,
.qa-list {
  min-width: 0;
}
img, svg, video {
  max-width: 100%;
  height: auto;
}
.player-yt {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
}
.player-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ext-link {
  color: var(--mute);
  font-size: 12px;
  margin-left: 6px;
  text-decoration: underline;
}
.ext-wrap {
  display: block;
  margin-top: 4px;
}
.image-card .ext-wrap { text-align: center; }

@media (min-width: 1500px) {
  .thumbs,
  .image-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
  .thumbs,
  .image-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .search { flex-basis: 360px; max-width: 360px; }
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .thumbs,
  .image-grid,
  .topic-page .topic-image-grid,
  .topic-page .topic-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-nav .nav-placeholder { display: none; }
  .watch { grid-template-columns: 1fr; }
  .watch-side { display: none; }
  .watch-side .thumbs,
  .related-section .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .top-main { flex-wrap: wrap; height: auto; min-height: 40px; gap: 8px; padding-bottom: 6px; }
  .search { flex: 1 1 220px; max-width: none; order: 3; }
}
@media (max-width: 760px) {
  .thumbs,
  .image-grid,
  .topic-page .topic-image-grid,
  .topic-page .topic-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-page .topic-text-row { grid-template-columns: 1fr; gap: 18px; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-section .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body.tube { padding: 0 4px 8px; }
  .page-head { align-items: flex-start; }
  .updated-stamp { margin-left: 0; }
  .top-main { height: auto; gap: 3px; padding-bottom: 4px; }
  .logo { flex-basis: auto; font-size: 16px; letter-spacing: -0.4px; }
  .logo i { font-size: inherit; }
  .top-tools { gap: 0; font-size: 10px; }
  .language-choice summary { max-width: 78px; overflow: hidden; }
  .header-actions { margin-left: auto; gap: 1px; }
  .header-actions button,
  .header-actions a { font-size: 20px; }
  .search { display: none; }
  .top.search-open .top-main { flex-wrap: wrap; height: auto; }
  .top.search-open .search { display: flex; order: 5; flex-basis: 100%; margin: 0; max-width: none; }
  .main-nav {
    display: flex;
    height: 46px;
    margin-top: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 0;
  }
  .main-nav > a,
  .main-nav > .drop {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 4px 10px;
  }
  [data-search-toggle] { display: block; }
  .page { padding-top: 12px; }
  .thumbs,
  .image-grid { grid-template-columns: 1fr; margin: 0; }
  .thumb,
  .image-card { padding: 10px 2px; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-section .thumbs { grid-template-columns: 1fr; }
  .video-page-title { font-size: 20px; line-height: 26px; }
  .drop-list { min-width: 150px; max-width: calc(100vw - 16px); }
  .lang-drop { min-width: min(240px, calc(100vw - 16px)); }
  .topic-heading { font-size: 16px; }
  .topic-intro { padding: 12px; }
  .topic-blurb { font-size: 13px; line-height: 20px; }
  .crumbs { gap: 6px; margin-bottom: 10px; }
  .crumbs-current { max-width: 58vw; }
  .crumbs-back { padding: 3px 8px; font-size: 12px; }
  .post-row,
  .qa-row { padding: 10px 12px; }
  .pager { gap: 3px; }
  .pager a,
  .pager .page-numbers { padding: 6px 9px; font-size: 13px; }
}

body.mode-mobile .thumbs,
body.is-mobile .thumbs,
body.mode-mobile .image-grid,
body.is-mobile .image-grid { grid-template-columns: 1fr; }
body.mode-mobile .watch,
body.is-mobile .watch { grid-template-columns: 1fr; }
body.mode-mobile .main-nav,
body.is-mobile .main-nav {
  display: flex;
  overflow-x: auto;
  justify-content: flex-start;
}
@media (max-width: 420px) {
  .directory-grid { grid-template-columns: 1fr; }
}
