.matches-wrapper {
  min-height: 100vh;
}

.matches-container {
  padding-top: 72px;
}

.matches-back-btn {
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.matches-hero {
  background: linear-gradient(135deg, rgba(26, 61, 46, 0.96), rgba(61, 122, 94, 0.94));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.matches-kicker {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.matches-hero h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 2px;
}

.matches-hero p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.7;
}

.matches-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0 14px;
}

.matches-chart {
  text-align: center;
}

.matches-chart .match-pillar-card {
  min-width: 0;
  padding: 10px 4px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.matches-chart .match-pillar-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1;
  margin-bottom: 8px;
}

.matches-chart .match-pillar-ganzhi {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 3px;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.matches-birth-label {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.matches-privacy-note,
.matches-empty-note,
.matches-loading,
.matches-form-status {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.matches-privacy-note {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: rgba(184, 58, 42, 0.08);
  color: #8c2f24;
}

.matches-field {
  display: block;
  margin-bottom: 14px;
}

.matches-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-ink);
  font-weight: 600;
}

.matches-field input:not([type="checkbox"]),
.matches-field textarea {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-ink);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}

.matches-field textarea {
  resize: vertical;
  min-height: 112px;
}

.matches-field input:focus,
.matches-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

.matches-tags {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.matches-tag-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.matches-tag-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.matches-tag-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(45, 90, 74, 0.1);
  color: var(--primary-dark);
  font-weight: 700;
}

.matches-form-status {
  min-height: 22px;
  margin-top: 8px;
}

.matches-form-status.is-error {
  color: #b83a2a;
}

.matches-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.matches-list-header .section-title {
  margin-bottom: 0;
}

.matches-refresh-btn {
  flex: 0 0 auto;
  height: 34px;
  line-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.matches-posts {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.matches-post {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(168, 152, 128, 0.28);
  background: rgba(255, 255, 255, 0.46);
}

.matches-post-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.matches-post-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.matches-post-name {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.matches-gender-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(45, 90, 74, 0.18);
  background: rgba(45, 90, 74, 0.08);
  color: var(--primary);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}

.matches-post-meta {
  color: var(--text-secondary);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.matches-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.matches-post-tags span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(196, 162, 101, 0.16);
  color: #795f2d;
  font-size: 12px;
}

.matches-post-message {
  color: var(--text-ink);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.matches-post-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.matches-delete-btn {
  appearance: none;
  border: 1px solid rgba(162, 71, 60, 0.28);
  border-radius: 999px;
  background: rgba(162, 71, 60, 0.08);
  color: #9f3b32;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
}

.matches-delete-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.matches-link-btn {
  margin-top: 14px;
  text-decoration: none;
}

:lang(en) .matches-hero h1,
:lang(en) .matches-kicker,
:lang(en) .matches-chart,
:lang(en) .matches-birth-label {
  letter-spacing: 0;
}

:lang(en) .matches-tags {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 430px) {
  .matches-chart {
    gap: 6px;
  }

  .matches-chart .match-pillar-card {
    padding: 9px 3px 10px;
  }

  .matches-chart .match-pillar-ganzhi {
    font-size: 24px;
  }

  .matches-tags {
    grid-template-columns: repeat(2, 1fr);
  }
}
