.guides {
  --g-bg: #2b1f16;
  --g-bg-soft: #3a2a1f;
  --g-border: #6b4f39;
  --g-text: #f2e4d0;
  --g-muted: #d0b894;
  --g-link: #ffd57e;
  --g-link-hover: #ffe4a8;
  --g-tag-bg: #4a3526;
  --g-tag-border: #8b684b;
  --g-input-bg: #1f160f;
  --g-focus: #f4c86b;
  color: var(--g-text);
}

.guides a {
  color: var(--g-link);
}

.guides a:hover,
.guides a:focus {
  color: var(--g-link-hover);
}

.guides .intro {
  margin-bottom: 1.4rem;
}

.guides .intro h2 {
  margin: 1.1rem 0 0.6rem;
  color: var(--g-link);
  font-size: 1.25rem;
}

.guides-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: 0.6rem;
  align-items: center;
  background: linear-gradient(180deg, rgba(54, 39, 28, 0.95), rgba(40, 28, 20, 0.95));
  border: 1px solid var(--g-border);
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.guides-search,
.guides-select,
.guides-btn {
  min-height: 2.2rem;
  border-radius: 6px;
  border: 1px solid var(--g-border);
  background: var(--g-input-bg);
  color: var(--g-text);
  padding: 0.35rem 0.6rem;
}

.guides .guides-search,
.guides .guides-select {
  background-color: #120d08 !important;
  color: #f8ecd7 !important;
  border-color: #8f6d4f;
  -webkit-text-fill-color: #f8ecd7;
  caret-color: #ffd57e;
}

.guides-toolbar .guides-search {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.guides .guides-search::placeholder {
  color: #d8bc91 !important;
  opacity: 1;
}

.guides .guides-select option {
  background-color: #1b130d;
  color: #f8ecd7;
}

.guides .guides-btn {
  background-color: #4a3323 !important;
  color: #f8e4c4 !important;
  border-color: #9d7958;
  text-shadow: none;
}

.guides-select {
  width: 100%;
}

.guides-btn {
  cursor: pointer;
  background: var(--g-bg-soft);
  font-weight: 600;
}

.guides-btn:hover,
.guides-btn:focus,
.guides-search:focus,
.guides-select:focus {
  border-color: var(--g-focus);
  background-color: #5b3f2b;
  color: #fff3dc;
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 200, 107, 0.2);
}

.guides-count {
  color: var(--g-muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.guides-error,
.guides-empty {
  border: 1px solid #a04f4f;
  background: #3e1d1d;
  color: #ffd2d2;
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
}

.guides-list {
  display: grid;
  gap: 0.8rem;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

.guide-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.9rem;
  border: 1px solid var(--g-border);
  border-radius: 10px;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(48, 35, 25, 0.95), rgba(34, 24, 17, 0.95));
  box-sizing: border-box;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

.guide-thumb {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.guide-thumb img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  background: #1c130d;
}

.guide-content {
  min-width: 0;
}

.guide-title a {
  overflow-wrap: anywhere;
}

.guide-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0.65rem;
}

.guide-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--g-tag-border);
  background: var(--g-tag-bg);
  color: var(--g-muted);
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.guide-tag-id {
  color: #ffe0b3;
  border-color: #b38456;
}

.guide-desc {
  color: var(--g-text);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.guide-desc p {
  margin: 0.4rem 0;
}

.guide-desc ul,
.guide-desc ol {
  margin: 0.4rem 0 0.4rem 1.1rem;
  padding: 0;
}

@media (max-width: 1140px) {
  .guides-toolbar {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .guides-toolbar {
    grid-template-columns: 1fr;
  }

  .guides-count {
    white-space: normal;
  }

  .guide-card {
    grid-template-columns: 1fr;
  }

  .guide-thumb {
    justify-content: flex-start;
  }
}
