:root {
  color-scheme: light;
  --paper: #f9f7f3;
  --ink: #25201e;
  --muted: #625955;
  --accent: #a01b49;
  --line: #ded7d1;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.masthead { padding-bottom: 14px; }
.masthead img { display: block; width: 100%; height: auto; border-radius: 6px; }
.top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 76px; gap: 14px; }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 800; font-size: .86rem; letter-spacing: .115em; }
.primary, .secondary { border-radius: 6px; padding: 9px 16px; font-weight: 700; font-size: .9rem; border: 1px solid var(--accent); }
.primary { background: var(--accent); color: white; }
.primary:hover { background: #7c1539; }
.primary span { margin-right: 4px; }
.secondary { background: transparent; border-color: var(--line); }
.secondary:hover { background: #f0eae4; }
.intro { position: relative; padding: 55px 0 45px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: .8rem; font-weight: 800; letter-spacing: .19em; }
.eyebrow::before { content: ''; background: var(--accent); width: 31px; height: 2px; }
h1 { font: 700 clamp(3.5rem, 8vw, 7.25rem)/.92 var(--serif); letter-spacing: -.075em; margin: 20px 0; }
h1 em { color: var(--accent); font-weight: 400; }
.intro p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 14px 0; border-block: 1px solid var(--line); }
.topics, .inputs, .tag-list, .detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topics button { border: 1px solid var(--line); border-radius: 100px; background: transparent; padding: 7px 13px; font-size: .875rem; font-weight: 650; }
.topics button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.topics button[aria-pressed="false"]:hover { border-color: var(--muted); }
.search, .select { position: relative; display: block; }
.search input, select, textarea { background: #fffdfa; border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; min-width: 0; width: 100%; }
.search { width: 174px; }
.search input { padding-left: 32px; }
.glass { position: absolute; top: 14px; left: 12px; width: 11px; height: 11px; border: 1.5px solid var(--muted); border-radius: 100%; pointer-events: none; }
.glass::after { content: ''; position: absolute; width: 6px; height: 1.5px; background: var(--muted); transform: rotate(45deg); left: 7px; top: 8px; }
#tags { max-width: 175px; }
select { appearance: none; padding-right: 31px; }
.select::after { content: ''; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; width: 7px; height: 7px; position: absolute; right: 13px; bottom: 18px; transform: rotate(45deg); pointer-events: none; }
.results { display: flex; align-items: center; justify-content: space-between; min-height: 52px; color: var(--muted); font-size: .875rem; }
.results p { margin: 0; }
.plain { color: var(--accent); border: 0; padding: 4px; background: transparent; text-decoration: underline; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-bottom: 56px; }
.card, .post { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fffdfa; min-width: 0; display: flex; flex-direction: column; }
.art { border: 0; padding: 0; display: block; width: 100%; overflow: hidden; background: #eee7e0; }
/* Nowe rysunki publikujemy w formacie 1199 × 1312 px, jak „219 misek”. */
.art img { display: block; width: 100%; aspect-ratio: 1199 / 1312; object-fit: contain; }
.art:hover img { filter: brightness(.92); }
.card-copy { padding: 18px 19px; display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.category { text-transform: uppercase; color: var(--accent); letter-spacing: .085em; font-weight: 800; font-size: .75rem; }
.card-title { font: 700 1.5rem/1.1 var(--serif); margin: 7px 0 0; letter-spacing: -.025em; }
.card-title button { border: 0; background: transparent; padding: 0; text-align: left; }
.card-title a { color: inherit; text-decoration: none; }
.card-title :is(a, button):hover { color: var(--accent); }
.comment { margin: 10px 0 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry-description { width: 100%; margin: 0 0 12px; }
.entry-description summary { color: var(--accent); cursor: pointer; font-weight: 650; }
.entry-description p { margin: 6px 0 0; }
.tag-list :is(button, a) { text-decoration: none; background: #f3ede9; color: #574a48; padding: 3px 9px; border: 1px solid transparent; border-radius: 100px; font-size: .8rem; overflow-wrap: anywhere; max-width: 100%; }
.tag-list :is(button, a):hover { border-color: var(--accent); }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 10px;
}
.card-actions > .voting { margin-inline-start: auto; }
.voting {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: none;
  align-items: center;
  white-space: nowrap;
}
.voting::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 5px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.voting button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  background-clip: content-box;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
}
.voting button:hover { background-color: #eee7e2; color: var(--accent); }
.voting button[aria-pressed="true"] { background-color: #f3dce5; color: var(--accent); }
.voting button[aria-disabled="true"] { cursor: wait; }
.vote-score {
  min-width: 26px;
  padding: 0 5px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 750;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.vote-score[title] { text-decoration: underline dotted; }
.copy {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
}
.copy:hover { text-decoration: underline; }
.copy-icon { position: relative; flex: none; width: 10px; height: 12px; border: 1px solid; border-radius: 2px; }
.copy-icon::before { content: ''; position: absolute; right: 2px; bottom: 2px; width: 8px; height: 10px; border-left: 1px solid; border-top: 1px solid; border-radius: 2px; }
dialog { max-height: 92dvh; max-width: calc(100vw - 26px); border: 1px solid var(--line); border-radius: 12px; background: #fffdfa; padding: 0; color: var(--ink); }
dialog::backdrop { background: #211722bb; }
.modal { position: relative; }
.detail-modal { width: min(1000px, calc(100vw - 28px)); display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; }
#detail-image { display: block; width: 100%; max-height: 85dvh; object-fit: contain; background: #ede4dd; }
.detail-copy { padding: 28px; }
.detail-copy h2 { font: 700 2rem/1.1 var(--serif); margin: 10px 0 14px; }
.detail-actions { margin-top: 18px; }
.detail-actions a { color: var(--accent); margin-left: 10px; }
.close-form { position: absolute; top: 10px; right: 10px; z-index: 1; }
.close { color: var(--ink); background: #fffdfa; border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; font-size: 1.5rem; line-height: 1; }
textarea { resize: vertical; }
.hint { color: var(--muted); font-size: .875rem; font-weight: 400; }
#toast:not(:empty) { position: fixed; z-index: 2; color: white; background: var(--ink); padding: 10px 16px; border-radius: 6px; bottom: 18px; right: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 980px) {
  .wrap { width: calc(100% - 48px); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .brand { font-size: .72rem; letter-spacing: .07em; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .top-inner { min-height: 65px; }
  .intro { padding: 38px 0 32px; }
  .inputs { width: 100%; }
  .search { flex: 1; min-width: 110px; }
  #tags { max-width: 140px; }
  .gallery { grid-template-columns: 1fr; }
  .detail-modal { display: block; }
  #detail-image { max-height: 60dvh; }
  .detail-copy { padding: 22px; }
}

.filters[hidden], .results[hidden] { display: none; }
.post-wrap { padding-top: 20px; padding-bottom: 56px; }
.post-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-bottom: 14px; }
.post-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent); font-weight: 650; }
.post-neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.post-neighbors a { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.post-neighbors a:hover { border-color: var(--accent); }
.post-neighbors span { color: var(--accent); font-size: .875rem; font-weight: 650; }
.post-neighbors a[rel="next"] { grid-column: 2; text-align: right; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 48px; }
#gallery { padding-bottom: 26px; scroll-margin-top: 16px; }
.pagination a, .pagination-gap { display: inline-flex; min-width: 44px; min-height: 44px; padding: 4px 10px; align-items: center; justify-content: center; }
.pagination a { border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-weight: 650; text-decoration: none; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination-gap { color: var(--muted); }
.post { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; }
.post-image { display: block; width: 100%; height: auto; max-height: 85dvh; object-fit: contain; background: #ede4dd; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.post-meta time { color: var(--muted); font-size: .875rem; }
.card-copy > .post-meta { width: 100%; }
.card-copy > .post-meta time { margin-inline-start: auto; }
.post h1 { font: 700 clamp(1.8rem, 3.8vw, 3rem)/1.05 var(--serif); margin: 10px 0 14px; }
.post .comment { font-size: 1.125rem; font-weight: 650; }
.post-description { margin-top: 16px; }
.post-description, .entry-description p { white-space: pre-line; }
@media (max-width: 720px) {
  .post { grid-template-columns: 1fr; }
}

.card-copy { container-type: inline-size; }
.card-tools { display: flex; align-items: center; min-width: 0; }
.card-tool, .published-tools .copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
}
.card-tool:hover, .published-tools .copy:hover { color: var(--accent); }
.action-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voting button { display: grid; place-items: center; }
.thumb-down { transform: scaleY(-1); }
.published-tools .copy-label { display: none; }
@container (min-width: 280px) {
  .published-tools .copy { gap: 7px; padding-inline: 0 8px; }
  .published-tools .copy-label { display: inline; }
}
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}
.post-actions > :is(a, button), .post-actions summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 12px;
  color: var(--accent);
  text-decoration: none;
}
.post-actions > :is(a, button):hover, .post-actions summary:hover { text-decoration: underline; }
.post-actions .action-icon { width: 16px; height: 16px; }
.comments {
  max-width: 720px;
  margin: 28px auto 0;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  scroll-margin-top: 16px;
}
.comments h2 { font: 700 clamp(1.55rem, 3vw, 2.1rem)/1.12 var(--serif); margin: 0 0 18px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: grid; gap: 4px; font-weight: 650; }
.comment-form input {
  width: min(100%, 280px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdfa;
}
.comment-form button { justify-self: start; min-height: 44px; }
.comment-form button:disabled { opacity: .65; cursor: wait; }
.comments .hint, .status-message { margin: 0; }
.status-message:not(:empty) { margin-top: 12px; font-size: .875rem; color: var(--accent); }
.comment-list { list-style: none; margin: 18px 0 0; padding: 0; }
.comment-list li { padding: 14px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.comment-meta time { color: var(--muted); font-size: .875rem; }
.comment-body { margin: 4px 0 0; white-space: pre-wrap; }
#more-comments { min-height: 44px; margin-top: 10px; }

.comment-verification:empty { display: none; }

.social-share { position: relative; flex: none; }
.social-share summary { list-style: none; cursor: pointer; }
.social-share summary::-webkit-details-marker { display: none; }
.social-share[open] summary { color: var(--accent); }
.social-share summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.social-choices {
  position: absolute;
  z-index: 2;
  inset-inline-start: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, 44px);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 6px 20px #25201e17;
}
.social-share:not([open]) .social-choices { display: none; }
.social-choices a {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 5px;
}
.social-choices svg { display: block; width: 21px; height: 21px; fill: currentColor; }
.social-choice-facebook { color: #0866ff; }
.social-choice-brand-x { color: var(--ink); }
.social-choices a:hover, .social-choices a:focus-visible { background: #f3ede9; }

.analytics-footer { padding-block: 0 18px; }
.analytics-footer button {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.analytics-consent {
  position: fixed;
  z-index: 10;
  bottom: 16px;
  inset-inline-end: 16px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 8px 24px #25201e25;
}
.analytics-consent h2 { margin: 0; font: 700 1.2rem/1.2 var(--serif); }
.analytics-consent p { margin: 8px 0 14px; color: var(--muted); font-size: .9rem; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.topic-intro { max-width: 65ch; margin-bottom: 28px; }
