/* ShowPages Theme Styles */

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

body {
  background-color: #f9f5f0;
  font-family: Georgia, 'Times New Roman', serif;
  color: #333;
  line-height: 1.8;
  min-height: 100vh;
}

/* ── Header & Navigation ── */

.site-header {
  padding: 20px 40px 0;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.site-nav a {
  text-decoration: none;
  color: #555;
  font-size: 16px;
  padding: 4px 0;
  transition: color 0.2s;
}

.site-nav .site-title {
  font-size: 28px;
  font-weight: normal;
  color: #b8541e;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-links {
  display: flex;
  gap: 24px;
}

.site-nav-links a:hover {
  color: #222;
}

.site-nav-links a.active {
  color: #b8541e;
  font-weight: bold;
}

/* ── Main Content ── */

.site-main {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ── Page ── */

/*.page-title,*/
.post-title,
.archive-title {
  font-size: 28px;
  margin-bottom: 16px;
  font-weight: normal;
}

.page-content,
.post-content {
  font-size: 17px;
}

.page-content p,
.post-content p {
  margin-bottom: 1em;
}

/* ── Content Headings ── */

.page-title h1 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-weight: normal;
  line-height: 1.4;
}

.page-title h1 {
  font-size: 26px;
}

/* ── Post ── */

.post-header {
  margin-bottom: 24px;
}

.post-date {
  color: #999;
  font-size: 14px;
}

/* ── Archive ── */

.archive-list {
  list-style: none;
  padding: 0;
}

.archive-item {
  padding: 10px 0;
  border-bottom: 1px solid #e8e3dc;
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.archive-date {
  color: #999;
  font-size: 14px;
  flex-shrink: 0;
}

.archive-link {
  text-decoration: none;
  color: #333;
}

.archive-link:hover {
  color: #b8541e;
}

/* ── Code ── */

code {
  background: #fff9c4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92em;
}

pre {
  background: #fff9c4;
  padding: 16px 20px;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.6;
  margin-bottom: 1em;
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* ── Dictionary ── */

.dict {
  column-count: 3;
  column-gap: 32px;
  column-rule: 1px solid #e8e3dc;
}

.dict-empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
}

.dict-group {
  break-inside: avoid;
  margin-bottom: 32px;
}

.dict-letter {
  font-size: 18px;
  font-weight: normal;
  color: #b8541e;
  border-bottom: 1px solid #d5cfc5;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.dict-entry {
  display: block;
  padding: 3px 0;
  line-height: 1.7;
  font-size: 16px;
}

.dict-pinyin {
  color: #aaa;
  font-size: 0.85em;
}

@media (max-width: 700px) {
  .dict {
    column-count: 2;
    column-gap: 24px;
  }
}

@media (max-width: 480px) {
  .dict {
    column-count: 1;
  }
}

/* ── Search ── */

.dict-search {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.dict-search-input {
  width: 240px;
  padding: 8px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #333;
  background: #fff;
  border: 1px solid #d5cfc5;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dict-search-input:focus {
  border-color: #b8541e;
  box-shadow: 0 0 0 2px rgba(184, 84, 30, 0.12);
}

.dict-search-input::placeholder {
  color: #bbb;
}

.dict-search-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0dbd3;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 100;
  margin-top: 4px;
}

.dict-search-item {
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px solid #f3efe8;
  transition: background 0.15s;
}

.dict-search-item:last-child {
  border-bottom: none;
}

.dict-search-item:hover,
.dict-search-item.active {
  background: #fdf3e8;
}

.dict-search-item-ipa {
  color: #bbb;
  font-size: 0.85em;
}

.dict-search-empty {
  padding: 16px 14px;
  color: #999;
  font-size: 14px;
  text-align: center;
}

.dict-entry.highlight {
  background: #fff9c4;
  border-radius: 3px;
  padding: 2px 4px;
}

/* ── Note ── */

.note-text {
  font-size: 13px;
  color: #999;
  display: block;
  line-height: 1.6;
}

/* ── Welcome ── */

.welcome {
  text-align: center;
  padding: 80px 0;
}

.welcome h1 {
  font-size: 32px;
  font-weight: normal;
  color: #555;
}