.swf-facility .featured-image,
.swf-facility .page-header-image,
.swf-facility .page-header-image-single {
  display: none;
}

.sw-finder,
.sw-detail {
  --sw-ink: #1a2332;
  --sw-muted: #5c6778;
  --sw-line: #e5ebf2;
  --sw-soft: #f4f6f8;
  --sw-accent: #1f4b4a;
  --sw-accent-dark: #163836;
  --sw-card: #fff;
  color: var(--sw-ink);
  font-size: 16px;
  line-height: 1.55;
}

.sw-finder {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.sw-detail {
  max-width: 880px;
  margin-right: auto;
  margin-left: auto;
}

.sw-finder *,
.sw-detail * {
  box-sizing: border-box;
}

.sw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sw-toolbar {
  display: grid;
  gap: 16px;
  margin: 8px 0 22px;
  padding: 18px;
  border: 1px solid #e7edf3;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(26, 35, 50, 0.06);
}

.sw-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sw-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.sw-label {
  color: #6b7789;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.sw-finder .sw-toolbar input,
.sw-finder .sw-toolbar select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  background-color: #f7f9fb;
  color: var(--sw-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 48px;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.sw-finder .sw-search input {
  height: 54px;
  min-height: 54px;
  padding: 0 16px 0 48px;
  border-radius: 16px;
  background-color: #f4f7f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%231f4b4a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='M14 14l4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px 50%;
  background-size: 18px;
  font-size: 16px;
  font-weight: 500;
  line-height: 54px;
}

.sw-finder .sw-search input::-webkit-search-decoration,
.sw-finder .sw-search input::-webkit-search-cancel-button,
.sw-finder .sw-search input::-webkit-search-results-button {
  display: none;
  -webkit-appearance: none;
}

.sw-finder .sw-search input::placeholder {
  color: #8b97a8;
  font-weight: 500;
}

.sw-finder .sw-toolbar select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c6778' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.sw-finder .sw-toolbar input:focus,
.sw-finder .sw-toolbar select:focus {
  border-color: var(--sw-accent);
  background-color: #fff;
  outline: 3px solid rgba(31, 75, 74, 0.14);
}

.sw-pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 22px 0 8px;
}

.sw-pager[hidden] {
  display: none;
}

.sw-finder .sw-pager button {
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #fff;
  color: var(--sw-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 42px;
  cursor: pointer;
}

.sw-finder .sw-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

.sw-source {
  margin: 18px 0 0;
  color: var(--sw-muted);
  font-size: 13px;
  line-height: 1.5;
}

.sw-count {
  margin: 0 0 16px;
  color: var(--sw-muted);
  font-size: 15px;
}

.sw-count strong {
  color: var(--sw-ink);
  font-size: 20px;
  font-weight: 800;
}

.sw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sw-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(26, 35, 50, 0.06);
  border-radius: 20px;
  background: var(--sw-card);
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sw-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(26, 35, 50, 0.09);
}

.sw-card[hidden] {
  display: none;
}

.sw-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--sw-soft);
  text-decoration: none;
}

.sw-card-media img,
.sw-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sw-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(160deg, #2d6664, #1f4b4a);
  font-size: 20px;
  font-weight: 800;
}

.sw-card-media:has(.sw-placeholder) .sw-badge {
  display: none;
}

.sw-card[data-type="복지주택"] .sw-placeholder { background: linear-gradient(160deg, #1d8a68, #0f6b50); }
.sw-card[data-type="요양원"] .sw-placeholder { background: linear-gradient(160deg, #d08a2d, #b56a12); }
.sw-card[data-type="요양병원"] .sw-placeholder { background: linear-gradient(160deg, #d45b73, #b23d56); }

.sw-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--sw-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(26, 35, 50, 0.12);
}

.sw-card[data-type="복지주택"] .sw-badge { color: #0f6b50; }
.sw-card[data-type="요양원"] .sw-badge { color: #9a5a0d; }
.sw-card[data-type="요양병원"] .sw-badge { color: #b23d56; }

.sw-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 16px;
}

.sw-finder h2 {
  margin: 0;
  color: var(--sw-ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.sw-finder h2 a {
  color: inherit;
  text-decoration: none;
}

.sw-finder h2 a:hover {
  color: var(--sw-accent);
}

.sw-loc,
.sw-excerpt,
.sw-tags,
.sw-price-sub {
  margin: 0;
  color: var(--sw-muted);
  font-size: 14px;
}

.sw-loc {
  font-weight: 600;
}

.sw-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sw-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--sw-soft);
  color: #3d4a5c;
  font-size: 12px;
  font-weight: 700;
}

.sw-card-foot {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

.sw-card-foot:not(:has(.sw-price)) {
  justify-content: flex-end;
}

.sw-price {
  display: grid;
  flex: 1;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.sw-price div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.sw-price dt,
.sw-price dd {
  margin: 0;
}

.sw-price dt {
  color: var(--sw-muted);
  font-size: 13px;
  font-weight: 700;
}

.sw-price dd {
  color: var(--sw-ink);
  font-size: 15px;
  font-weight: 800;
}

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--sw-accent);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
}

.sw-btn:hover {
  background: var(--sw-accent-dark);
  color: #fff !important;
}

.sw-btn-ghost {
  background: #fff;
  color: var(--sw-accent) !important;
  box-shadow: inset 0 0 0 1px #c9d5d4;
}

.sw-btn-ghost:hover {
  background: #f3f7f6;
}

.sw-empty {
  margin: 18px 0 0;
  padding: 28px 20px;
  border: 1px dashed #d3dce6;
  border-radius: 18px;
  background: var(--sw-soft);
  text-align: center;
}

.sw-empty a {
  margin-left: 6px;
  font-weight: 800;
}

.sw-detail {
  margin: 0 0 32px;
}

.sw-back {
  margin: 0 0 14px;
}

.sw-back a {
  color: var(--sw-accent);
  font-weight: 800;
  text-decoration: none;
}

.sw-back a::before {
  content: "← ";
}

.sw-detail-hero {
  margin: 0 0 18px;
}

.sw-detail-hero img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 22px;
}

.sw-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}

.sw-fact {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--sw-soft);
}

.sw-fact-wide {
  grid-column: 1 / -1;
}

.sw-facts dt {
  margin: 0 0 4px;
  color: var(--sw-muted);
  font-size: 12px;
  font-weight: 700;
}

.sw-facts dd {
  margin: 0;
  color: var(--sw-ink);
  font-size: 15px;
  font-weight: 600;
}

.sw-facts a {
  color: var(--sw-accent);
  font-weight: 700;
}

.sw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.sw-updated {
  margin: 0;
  color: var(--sw-muted);
  font-size: 13px;
}

.sw-gallery {
  margin-top: 22px;
}

.sw-gallery h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.sw-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.sw-gallery-grid a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--sw-soft);
}

.sw-gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  body.swf-finder-page .entry-header,
  body.swf-finder-page .page-header .inside-page-header,
  body.swf-finder-page .entry-content,
  body.swf-finder-page.full-width-content .inside-article {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
  }

  body.swf-facility .entry-header,
  body.swf-facility .page-header .inside-page-header,
  body.swf-facility .entry-content,
  body.swf-facility.full-width-content .inside-article {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 980px) {
  .sw-grid,
  .sw-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sw-toolbar {
    padding: 12px;
    border-radius: 18px;
  }

  .sw-grid,
  .sw-controls,
  .sw-facts {
    grid-template-columns: 1fr;
  }

  .sw-fact-wide {
    grid-column: auto;
  }

  .sw-card-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .sw-card-foot:not(:has(.sw-price)) {
    justify-content: stretch;
  }

  .sw-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sw-card {
    transition: none;
  }

  .sw-card:hover {
    transform: none;
  }
}
