/* без google fonts — как нормальный старый сайт */
body {
  margin: 0;
  font: 15px/1.45 Tahoma, Verdana, Arial, sans-serif;
  color: #222;
  background: #e8e8e8 url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%23ddd'/%3E%3C/svg%3E");
}

a { color: #0645ad; }
a:visited { color: #0b0080; }
a:hover { text-decoration: none; }

.page {
  max-width: 980px;
  margin: 12px auto 40px;
  background: #fff;
  border: 1px solid #aaa;
  box-shadow: 2px 2px 4px rgba(0,0,0,.15);
}

.crumbs {
  background: #f6f6f6;
  border-bottom: 1px solid #ccc;
  padding: 9px 16px;
  font-size: 13px;
  color: #555;
}

.crumbs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crumbs-left {
  min-width: 0;
}

.crumbs ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline;
}

.crumbs li { display: inline; }

.crumbs li + li::before {
  content: " » ";
  color: #999;
}

.crumbs li[aria-current="page"] {
  color: #222;
  font-weight: bold;
}

.crumbs .updated {
  color: #888;
  font-size: 12px;
  margin-left: 10px;
}

header {
  padding: 18px 20px 14px;
  border-bottom: 3px double #ccc;
}

.upload-btn {
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  text-decoration: none;
  color: #222 !important;
  background: linear-gradient(to bottom, #f9f9f9, #e3e3e3);
  border: 1px solid #999;
  border-radius: 2px;
  white-space: nowrap;
}

.upload-btn:visited {
  color: #222 !important;
}

.upload-btn:hover {
  background: #dceeff;
  border-color: #669;
}

.upload-btn:active {
  background: #ddd;
}

h1 {
  margin: 0 0 6px;
  font: bold 22px Georgia, "Times New Roman", serif;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  width: 32px;
  height: 30px;
  flex-shrink: 0;
}

.tagline {
  margin: 0;
  color: #666;
  font-size: 13px;
}

.bar {
  margin: 0 20px 14px;
  padding: 6px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 4px;
  align-items: center;
}

.bar button {
  font: inherit;
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  background: linear-gradient(to bottom, #f9f9f9, #e3e3e3);
  border: 1px solid #999;
  border-radius: 2px;
}

.bar button:active { background: #ddd; }

.bar button.on {
  background: #dceeff;
  border-color: #669;
  font-weight: bold;
}

.count {
  margin-left: 8px;
  color: #888;
  font-size: 12px;
}

.grid {
  padding: 0 16px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.item {
  border: 1px solid #bbb;
  background: #fafafa;
  cursor: pointer;
}

.item:hover { border-color: #666; }

.item .pic {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ddd;
}

.item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.meta {
  padding: 5px 7px;
  font-size: 11px;
  color: #777;
  border-top: 1px solid #ddd;
}

.loading {
  padding: 30px 20px 10px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

.sentinel {
  height: 1px;
  margin-bottom: 40px;
}

.lb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 48px 12px 24px;
  box-sizing: border-box;
}

.lb.open { display: flex; }

.lb img {
  max-width: 92vw;
  max-height: min(72vh, 640px);
  border: 3px solid #fff;
  box-shadow: 0 0 20px #000;
  flex-shrink: 0;
}

.lb-close {
  position: fixed;
  top: 12px;
  right: 16px;
  font: bold 14px Tahoma, sans-serif;
  color: #fff;
  background: #333;
  border: 1px solid #666;
  padding: 6px 12px;
  cursor: pointer;
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font: bold 28px/1 Georgia, serif;
  color: #fff;
  background: rgba(0,0,0,.4);
  border: none;
  padding: 8px 14px;
  cursor: pointer;
}

.lb-prev { left: 8px; }
.lb-next { right: 8px; }

.lb-info {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #ccc;
  font-size: 12px;
  background: rgba(0,0,0,.5);
  padding: 4px 10px;
}

.lb-actions {
  position: fixed;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 6px;
}

.lb-like,
.lb-share {
  font: bold 14px Tahoma, sans-serif;
  color: #fff;
  background: rgba(0,0,0,.55);
  border: 1px solid #888;
  padding: 6px 12px;
  cursor: pointer;
}

.lb-like.on {
  color: #ffb3b3;
  border-color: #c44;
  background: rgba(80, 0, 0, .65);
}

.lb-like:disabled,
.lb-share:disabled {
  opacity: 0.6;
  cursor: wait;
}

.lb-share.flash {
  border-color: #6a6;
  background: rgba(0, 40, 0, .65);
}

.meta span {
  white-space: nowrap;
}

.permalink-comments,
.lb-comments {
  width: min(92vw, 480px);
  margin: 16px auto 0;
  padding: 12px 14px;
  background: #f8f4ec;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

.permalink-comments h2,
.lb-comments h2 {
  font: bold 16px Georgia, serif;
  margin: 0 0 12px;
}

.comment-item {
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px dotted #bbb;
}

.comment-head {
  margin-bottom: 4px;
  font-size: 11px;
}

.comment-author {
  color: #117743;
  font-weight: bold;
  margin-right: 8px;
}

.comment-item time {
  color: #666;
}

.comment-no {
  color: #888;
  margin-left: 8px;
}

.comment-body {
  margin: 0;
  line-height: 1.45;
}

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: 13px Tahoma, sans-serif;
  padding: 8px;
  border: 1px solid #999;
  margin-bottom: 8px;
}

.comment-form button {
  font: bold 13px Tahoma, sans-serif;
  padding: 6px 14px;
  cursor: pointer;
}

.comment-hint {
  font-size: 12px;
  color: #666;
  margin: 8px 0 0;
}

.about-text {
  max-width: 640px;
  line-height: 1.55;
  font-size: 14px;
}

.about-text h2 {
  font: bold 16px Georgia, serif;
  margin: 20px 0 8px;
}

.about-text ul {
  margin: 0;
  padding-left: 20px;
}

footer {
  border-top: 1px solid #ccc;
  padding: 12px 20px 16px;
  font-size: 12px;
  color: #888;
  background: #f6f6f6;
}

footer hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 10px 0;
}

.site-stats {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: #555;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 2px;
}

.site-stats b {
  color: #0645ad;
  font-size: 13px;
}

@media (max-width: 800px) {
  .crumbs-row { flex-wrap: wrap; }
  .upload-btn { margin-left: auto; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .count { margin-left: 0; width: 100%; }
}
