@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');
body { font-family: 'Noto Sans JP', sans-serif; }

:root {
  --color-text: #333;
  --color-text-light: #666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
}

.faq-widget {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
}

.faq-tabs {
  display: flex;
  background: #fff;
  padding: 16px 16px 0;
  border-bottom: 1px solid #eee;
  gap: 8px;
}
.faq-tabs .tab {
  flex: 1;
  padding: 12px 16px;
  background: #f1f3f5;
  color: var(--color-text-light);
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
}
.faq-tabs .tab.active {
  color: #fff;
  transform: translateY(1px);
}
.faq-tabs .tab:not(.active):hover {
  background: #e9ecef;
}

.faq-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.faq-item {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}
.faq-item:last-child {
  border-bottom: none;
}

.faq-item .question {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  background: #fff;
  transition: background-color 0.2s;
}
.faq-item .question:hover {
  background-color: #fafafa;
}

.tag-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 4px 10px;
  margin-right: 16px;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 20px;
  color: #fff;
  margin-top: 2px;
}

.faq-item .question strong {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
}

.toggle-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
  border-radius: 50%;
  background: #f1f3f5;
  color: #adb5bd;
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}
.faq-item.open .toggle-icon {
  transform: rotate(45deg);
  background: #333;
  color: #fff;
}

.faq-item .answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  background-color: #fcfcfc;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.8;
  border-top: 1px dashed transparent;
}
.faq-item.open .answer {
  grid-template-rows: 1fr;
  border-top-color: #eee;
}

.faq-item .answer-content {
  overflow: hidden;
  opacity: 0;
  padding: 0 24px 0 120px;
  transition: opacity 0.3s ease-out, padding 0.3s ease-out;
}
.faq-item.open .answer-content {
  opacity: 1;
  padding-top: 20px;
  padding-bottom: 24px;
}

.faq-item .answer a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: bold;
}
.faq-item .answer a:hover {
  text-decoration: underline;
}

.supplement {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border-left: 4px solid #ccc;
  font-size: 0.9rem;
  color: var(--color-text-light);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (max-width: 600px) {
  .faq-item .question {
    flex-direction: column;
    align-items: flex-start;
  }
  .tag-icon {
    margin-bottom: 8px;
  }
  .faq-item .answer-content {
    padding-left: 20px;
    padding-right: 20px;
  }
  .toggle-icon {
    position: absolute;
    top: 20px;
    right: 20px;
  }
}
