/* Finik — минималистичный стиль 90-х */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #c0c0c0;
  --fg:      #000000;
  --border:  #808080;
  --pre:     #a0a0a0;
  --w-pre:   #888888;
  --w-lived: #000000;
  --w-future-bg: transparent;
  --w-size:  11px;
  --gap:     2px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--fg); }
a:hover { text-decoration: underline; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ── ASCII header ── */
.ascii-header {
  border: 2px solid var(--fg);
  padding: 8px 12px;
  margin-bottom: 16px;
  background: var(--bg);
  white-space: pre;
  overflow-x: auto;
}
.ascii-header a { color: var(--fg); }

/* ── Dog + Stats row ── */
.dog-stats-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 0;
}
.ascii-dog {
  flex-shrink: 0;
  font-size: 6.5px;
  line-height: 1.05;
  margin: 0;
  overflow-x: auto;
  max-width: 70%;
  background: var(--bg);
}
.stats-section {
  flex-grow: 1;
  min-width: 390px;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .dog-stats-row {
    flex-direction: column;
    gap: 12px;
  }
  .ascii-dog {
    max-width: 100%;
    font-size: 4.5px;
  }
}

/* ── Sections ── */
.section {
  margin-bottom: 24px;
}
.section h2 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* ── Week grid ── */
.legend {
  margin-bottom: 6px;
  font-size: 13px;
}
.year-label {
  color: #555;
}
.week-grid {
  font-size: 11px;
  line-height: 1.4;
  white-space: pre;
  overflow-x: auto;
}
.w-pre    { color: #999999; }
.w-lived  { color: #000000; }
.w-future { color: #777777; }

/* ── Links heading spacing ── */
.links-heading {
  margin-top: 1em;
}

/* ── Stats ── */
.stats-box {
  border: 1px solid var(--fg);
  padding: 8px 12px;
  display: inline-block;
  background: var(--bg);
  white-space: pre;
}

/* ── Story preview ── */
.story-preview {
  border: 1px solid var(--fg);
  padding: 12px;
  background: var(--bg);
}
.story-preview h3 { margin: 4px 0 8px; }
.story-preview pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

.story-date {
  font-size: 12px;
  color: #444;
  margin-bottom: 4px;
}

/* ── Stories page ── */
.stories-list .story {
  margin-bottom: 16px;
}
.stories-list .story h3 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}
.stories-list .story pre {
  white-space: pre-wrap;
  word-break: break-word;
}
.stories-list hr {
  border: none;
  border-top: 1px solid var(--fg);
  margin: 16px 0;
}

/* ── Photo gallery ── */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.photo-item {
  border: 2px solid var(--fg);
  padding: 4px;
  background: var(--bg);
  max-width: 220px;
}
.photo-item img {
  display: block;
  width: 100%;
  height: auto;
}
.photo-caption {
  font-size: 12px;
  text-align: center;
  margin-top: 4px;
  word-break: break-word;
}
.photo-date {
  font-size: 11px;
  color: #444;
}

/* ── Footer ── */
.footer {
  margin-top: 24px;
  font-size: 12px;
  color: #444;
  text-align: right;
}

.empty {
  color: #555;
  font-style: italic;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .week-grid {
    font-size: 8px;
  }
  .ascii-header {
    font-size: 10px;
    overflow-x: hidden;
  }
}
