:root {
  --bg: #f7f8fa;
  --panel: #fff;
  --text: #111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #0f172a;
  --radius: 16px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
body {
  background: var(--bg);
  color: var(--text);
}
.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 20px;
}
.tf-title {
  font-size: 28px;
  font-weight: 800;
  margin: 10px 0 12px;
}
.tf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.tf-toolbar-left {
  flex: 1 1 60%;
}
.tf-toolbar-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tf-input.tf-search {
  width: 100%;
  min-width: 0;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
}
.tf-select {
  padding: 0.6em 0.9em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
@media (max-width: 960px) {
  .tf-toolbar {
    flex-wrap: wrap;
  }
  .tf-toolbar-left {
    flex: 1 1 100%;
  }
  .tf-toolbar-right {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}

.tf-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  margin-top: 18px;
}
@media (max-width: 960px) {
  .tf-layout {
    grid-template-columns: 1fr;
  }
}

.tf-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 32px);
  overflow: auto;
} /* sticky有効化: 高さを画面より少し小さく */
@media (max-width: 960px) {
  .tf-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
.tf-side-actions{
  position: fixed;
  bottom:8px;
  left:75px;
  z-index:100;
  padding-bottom: 16px;
}
.tf-side-actions button{
  background-color:#333;
  color:#fff;
}
.tf-side-actions button.ghost{
  background-color:#666;
  color:#fff;
}

/* Drawer for mobile */
.tf-burger {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
  margin-right: 6px;
  vertical-align: middle;
}
.tf-burger:before,
.tf-burger:after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.tf-burger:before {
  top: -6px;
}
.tf-burger:after {
  top: 6px;
}
@media (max-width: 960px) {
  .tf-open-filter {
    display: inline-flex;
  }
  .tf-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 88vw;
    max-width: 420px;
    background: var(--panel);
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-radius: 0;
    border-right: 1px solid var(--line);
    padding: 16px 14px 60px;
    overflow: auto;
  }
  .tf-drawer.is-open {
    transform: none;
  }
  .tf-drawer-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
  }
  .tf-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1090;
  }
  body.tf-no-scroll {
    overflow: hidden;
  }
}
@media (min-width: 961px) {
  .tf-open-filter {
    display: none;
  }
  .tf-drawer-backdrop {
    display: none !important;
  }
}

.tf-acc {
  margin: 0 0 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.tf-acc:has(+ .tf-side-actions){
  padding-bottom: 60px;
}
.tf-acc-title {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding-bottom: .6em;
}
.tf-acc-title::-webkit-details-marker {
  display: none;
}
.tf-acc[open] .tf-acc-title:after {
  content: "▲";
  float: right;
  color: var(--muted);
  font-size: 12px;
}
.tf-acc:not([open]) .tf-acc-title:after {
  content: "▼";
  float: right;
  color: var(--muted);
  font-size: 12px;
}
.tf-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
.tf-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tf-results {
  display: block !important;
  width: 100%;
}
.tf-results .tf-grid {
  display: grid !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 18px;
}
@media (min-width: 768px) {
  .tf-results .tf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .tf-results .tf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .tf-results .tf-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.tf-results .tf-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.tf-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  width: 100% !important;
  max-width: 100% !important;
}
.tf-thumb img,
.tf-ph {
  display: block;
  width: 100% !important;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #eef2f7;
}
.tf-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tf-name {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.tf-name .tf-id {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
}
.tf-price {
  margin: 6px 0;
  color: #333;
}
.tf-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  min-height: calc(1.6em * 4);
  color: #555;
  margin: 6px 0;
}
.tf-tax {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.tf-term {
  display: inline-block;
  background: #eefbf3;
  border: 1px solid #d1f1dc;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}
.tf-term.ind {
  background: #f6f7ff;
  border-color: #e5e7fd;
}
.tf-term.fn {
  background: #fff7ed;
  border-color: #ffe4c7;
}
.tf-acc-card {
  margin-top: 6px;
}
.tf-acc-card-title {
  display: block;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tf-acc-card-title::-webkit-details-marker {
  display: none;
}
.tf-links {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7em 1.1em;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.tf-btn.ghost {
  background: #fff;
}
.tf-card .tf-btn {
  width: 100%;
  background-color: #ff8a36;
  color: #fff;
  transition: all 0.3s;
}
.tf-card .tf-btn:hover {
  width: 100%;
  background-color: #ff5e36;
}
.tf-content {
  min-width: 0;
}

/* --- Desktop hides for mobile-only buttons --- */
.tf-open-filter {
  display: none;
} /* default hide */
@media (max-width: 960px) {
  .tf-open-filter {
    display: inline-flex;
  }
}
@media (min-width: 961px) {
  .tf-drawer-header {
    display: none;
  }
}

/* --- Toolbar label + input horizontal --- */
.tf-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tf-toolbar-left .tf-label {
  font-weight: 600;
  white-space: nowrap;
  color: #333;
}
@media (max-width: 960px) {
  .tf-toolbar-left {
    gap: 8px;
  }
}

/* タグ群を横並び＋折り返し */
.tf-genre,
.tf-industry,
.tf-function {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* 余白のダブり防止（既存スタイルがあれば不要） */
.tf-genre .tf-term,
.tf-industry .tf-term,
.tf-function .tf-term {
  margin: 0;
}

.footer{
  text-align: center;
}


/**/
/* Hide about-wrapper by default and set up fade-in transition */
.about-wrapper {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.60);
  z-index: 1000;
  overflow-y: auto;
  /* ぼかし効果を追加 */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* Show about-wrapper when checkbox is checked */
#about-toggle:checked ~ .about-wrapper {
  opacity: 1;
  pointer-events: auto;
}
/* Hide the checkbox */
#about-toggle {
  display: none;
}
/* Style for close button */
/* × ボタン（右上固定） */
.about-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  color: #111;
  font-size: 28px;
  line-height: 1;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.about-close:hover { background: #fff; }
.about-close:active { transform: scale(.98); }


.header-wrapper{
  display: flex;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .header-wrapper{
    flex-direction: column;
  }
}

/* =========================
   Minimal TCD Article CSS
========================= */

/* コンテナ */
.tcd-article {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 40px;
  line-height: 1.8;
  color: #222;
  background-color: #fff;
}

/* 見出し */
.tcd-article h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 12px;
  line-height: 1.4;
  font-weight: 700;
}
.tcd-article h3 {
  font-size: 1.25rem;
  margin: 60px 0 8px;
  font-weight: 700;
  border-left: 5px solid #485f82;
  padding-left: 10px;
}
.tcd-article h4 {
  font-size: 1.05rem;
  margin: 16px 0 6px;
  font-weight: 600;
}

/* テキスト */
.tcd-article p {
  margin: 2em 0;
}

/* リスト */
.tcd-article ul,
.tcd-article ol {
  margin: 8px 0 16px 1.5em;
}
.tcd-article li {
  margin-bottom: 4px;
}

/* 強調 */
.tcd-article strong {
  font-weight: 700;
}

/* テーブル */
.tcd-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}
.tcd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.tcd-table th,
.tcd-table td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  vertical-align: top;
}
.tcd-table th {
  background: #f9fafb;
  text-align: left;
  white-space: nowrap;
}

/* CTA */
.tcd-cta {
  margin: 24px 0;
  text-align: center;
}
.tcd-cta a {
  display: inline-block;
  background: #0d6efd;
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease;
}
.tcd-cta a:hover {
  background: #0b5ed7;
}

/* レスポンシブ（小画面） */
@media (max-width: 640px) {
  .tcd-article {
    padding: 16px;
  }
  .tcd-table th,
  .tcd-table td {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
}


