html.site-page {
  width: min(100%, 470px);
  min-height: 100%;
  margin-inline: auto;
  background: #e9edf2;
  container: site / inline-size;
}

html.site-page.wire-page {
  width: min(100%, 680px);
}

.site-page body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

.site-page main.site-content {
  display: block;
}

.site-nav {
  position: relative;
  z-index: 2;
  padding: 0.25rem 1rem;
  background: #f2f5f8;
  border-bottom: 1px solid #c9d0d9;
  font: 600 0.875rem/1.4 system-ui, sans-serif;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.35rem;
  color: #164c82;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-page :is(a, button):focus-visible {
  outline: 3px solid #1769b5;
  outline-offset: 3px;
}

.site-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.recents-page body {
  background: #fff;
  color: #000;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.2;
}

.recents-heading {
  padding: 1.75rem 1.25rem 1.25rem;
  border-bottom: 1px solid #dbe0e7;
  background: #f2f5f8;
}

.recents-heading h1 {
  margin: 0;
  font-family: inherit;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: normal;
}

.recents-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recents-list li + li {
  border-top: 1px solid #e0e5eb;
}

.recent-link {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  min-height: 4rem;
  padding: 0.65rem 1rem;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
}

.recent-link:hover {
  background: #f3f6fa;
}

.recents-page .recent-link:focus-visible {
  outline-offset: -4px;
}

.recent-link img {
  display: block;
  width: 1rem;
  height: 1rem;
}

.recent-link strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 1.15em;
  font-weight: 500;
}

.recent-time {
  color: #8a898f;
  font-family: inherit;
  font-size: 1em;
  font-weight: 100;
  text-align: end;
}

.recent-missed {
  color: #ff3232;
}

.film-photo {
  display: block;
  width: 100%;
  height: auto;
}

.site-content [data-gallery-photo] {
  display: block;
  min-width: 0;
  aspect-ratio: 1;
}

.site-content [data-gallery-photo] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-dialog {
  width: min(90vw, 46rem);
  max-height: 90dvh;
  padding: 1rem;
  box-sizing: border-box;
  border: 1px solid #b7c1cd;
  background: #f2f5f8;
  color: #182330;
  font: 1rem/1.5 system-ui, sans-serif;
}

.gallery-dialog::backdrop {
  background: rgb(12 22 34 / 75%);
}

.gallery-dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 60dvh;
  margin-inline: auto;
  object-fit: contain;
}

.gallery-dialog header,
.gallery-dialog footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.gallery-dialog h2 {
  margin: 0;
  font: inherit;
  font-weight: 700;
}

.gallery-dialog button,
.gallery-dialog footer a {
  min-height: 44px;
  padding-inline: 0.65rem;
  display: inline-flex;
  align-items: center;
  color: #164c82;
  text-decoration: underline;
}

.gallery-dialog button[aria-disabled="true"] {
  opacity: 0.55;
}

.site-playlist {
  display: block;
  margin: 0.75rem 1rem;
  color: inherit;
  text-decoration: underline;
}

.site-page #video-container {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible;
}

.site-page #video-container #container-top {
  position: relative;
  z-index: auto;
  width: 100%;
}

.site-page #video-container iframe {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.site-page #video-container #video-description,
.site-page #video-container #video-comments {
  position: relative;
  z-index: auto;
  top: auto;
  height: auto;
}

.site-page #video-container #video-description {
  display: flow-root;
  padding: 0.85rem 1rem;
  box-sizing: border-box;
  border-bottom: 1px solid #ddd;
}

.site-page #video-container #video-comments {
  display: flow-root;
}

.site-page #video-container #video-description :is(#video-title, #video-profile, #video-views, #video-text) {
  float: none;
  height: auto;
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.site-page #video-container #video-description #video-title {
  font-size: 1.25rem;
}

.site-page #video-container .comment .comment {
  font-size: 0.875rem;
  line-height: 1.45;
}
