* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font: 15px/1.55 Georgia, "Times New Roman", serif;
  color: #333;
  background: #f4f0e8;
}

a { color: #5a4a32; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  background: #e8e0d0;
  border-bottom: 1px solid #cfc4b0;
  padding: 14px 0;
  margin-bottom: 20px;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 22px;
  color: #4a3c28;
  font-weight: normal;
}

.logo span { color: #8b7355; }

nav a {
  margin-left: 14px;
  font-size: 14px;
  color: #5a4a32;
}

main.wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding-bottom: 40px;
}

.side .box {
  background: #fff;
  border: 1px solid #ddd5c8;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.side h3 {
  font-size: 14px;
  font-weight: normal;
  color: #6b5c48;
  margin-bottom: 8px;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 6px;
}

.side ul { list-style: none; }

.side li { margin: 5px 0; font-size: 13px; }

.side .stats p {
  font-size: 12px;
  color: #666;
  margin: 4px 0;
}

.content { min-width: 0; }

.crumb {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}

.joke-card {
  background: #fff;
  border: 1px solid #ddd5c8;
  padding: 20px 22px;
  margin-bottom: 24px;
}

.joke-card .meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tag {
  background: #efe8dc;
  color: #6b5c48;
  padding: 2px 8px;
  border-radius: 2px;
}

.joke-text {
  font-size: 17px;
  line-height: 1.65;
  color: #2a2a2a;
  min-height: 3.3em;
  transition: opacity 0.35s ease;
}

.joke-text.fade { opacity: 0.15; }

.actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#btn-next {
  font: 13px Georgia, serif;
  background: #e8e0d0;
  border: 1px solid #bfb39a;
  color: #4a3c28;
  padding: 6px 14px;
  cursor: pointer;
}

#btn-next:hover { background: #ddd5c4; }

.hint { font-size: 12px; color: #aaa; }

.recent h2 {
  font-size: 15px;
  font-weight: normal;
  color: #6b5c48;
  margin-bottom: 10px;
}

.recent ul { list-style: none; }

.recent li {
  font-size: 13px;
  color: #555;
  padding: 7px 0;
  border-bottom: 1px dotted #ddd;
  cursor: pointer;
}

.recent li:hover { color: #333; }

.foot {
  background: #e8e0d0;
  border-top: 1px solid #cfc4b0;
  padding: 16px 0;
  font-size: 12px;
  color: #777;
}

.foot .small { margin-top: 4px; font-size: 11px; color: #aaa; }

@media (max-width: 640px) {
  main.wrap { grid-template-columns: 1fr; }
  .side { display: none; }
}
