
:root {
  --font-bold: "MFW-PA1GothicStd-Bold",sans-serif;
  --color-bg: #f8fafc;
  --color-primary: #0f4c81;
  --color-secondary: #4a90e2;
  --color-accent: #e67e22;
  --color-text-main: #2c3e50;
  --color-text-sub: #5c6c7c;
  --color-digital: #81D4FA;
  --color-analog: #FFCC80;
  --color-hybrid: #E0BEE8;
  --shadow-card: 0 20px 40px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --radius-card: 16px;
  --radius-img: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

.content-section {
  padding: 35px 50px;
  background: #FDFAF1;
  background-size: 1382px;
  background-position: center 0;
  background-image: url('../../img/digital-analog2025/index/column-bg.png');
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .content-section {
      background-image: url('../../img/digital-analog2025/index/column-bg@2x.png');
    }
  }
  @media (width <= 800px) {
    padding: 33px 18px;
  }
  .header {
    text-align: center;
    margin-bottom: 53px;
    @media (width <= 800px) {
      margin-bottom: 24px;
    }
    h1 {
      font-size: 32px;
      font-family: var(--font-bold);
      letter-spacing: 0.08em!important;
      @media (width <= 800px) {
        margin-bottom: 7px;
        font-size: 26px;
      }
    }
    span {
      display: block;
      margin-bottom: 12px;
      font-size: 16px;
      letter-spacing: 0.08em;
      @media (width <= 800px) {
        margin-bottom: 5px;
        font-size: 13px;
      }
    }
    .read {
      color: #6f6f6f;
      font-size: 14px;
      line-height: 1.8;
      @media (width <= 800px) {
        font-size: 13px;
      }
    }
  }
  .notes {
    max-width: 600px;
    margin: 0 auto 62px;
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: 0;
    color: #9C9C9C;
    text-align: justify;
    @media (width <= 800px) {
      max-width: unset;
      margin: 0 6px;
    }
  }

  .column {
    margin: 160px 0 62px;
    @media (width <= 800px) {
      margin: 79px 0 62px;
    }
    h2 {
      margin-bottom: 36px;
      font-size: 16px;
      color: #6F6F6F;
      text-align: center;
    }

  }
}



h1 {
  margin: 0 0 12px 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.subtitle {
  font-size: 1rem;
  color: var(--color-text-sub);
  margin: 0 auto;
  max-width: 700px;
  line-height: 1.8;
  font-weight: 500;
}

.explore-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px 30px;
  margin-bottom: 40px;
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(0,0,0,0.03);
  @media (width <= 800px) {
    margin: 0 6px 40px;
  }
}

.explore-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 24px;
  border-right: 1px solid #f1f5f9;
}

.search-section {
    flex: 1;
    min-width: 220px;
}

.filter-section {
    flex: 1;
    min-width: 220px;
}

.category-section {
    flex: 1;
    min-width: 220px;
}

.explore-section:last-child {
  border-right: none;
  padding-right: 0;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* Keyword Search */
.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.search-input-wrapper input:focus {
  border-color: var(--color-digital);
  box-shadow: 0 0 0 3px rgba(129, 212, 250, 0.2);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1.1rem;
}

.search-options {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  color: #555;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Filters */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #777;
  min-width: 40px;
}

.btn-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #f5f5f5;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #e9e9e9;
}

.filter-btn.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  font-weight: 600;
}

/* Object Filter (Select Dropdown) */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 10px 32px 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  box-sizing: border-box;
  transition: all 0.2s;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 10px auto;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--color-digital);
  box-shadow: 0 0 0 3px rgba(129, 212, 250, 0.2);
}

/* Highlight matching nodes */
.node-dimmed {
  opacity: 0.05 !important;
  pointer-events: none;
}

.node-highlight circle {
    stroke: #C71585 !important;
    stroke-width: 3px !important;
    stroke-opacity: 1 !important;
    filter: drop-shadow(0 0 4px rgba(199, 21, 133, 0.4));
}

#main-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1280px;
  margin: 0 auto 95px;
  align-items: flex-start;
  @media (width <= 800px) {
    margin: 0 6px 32px;
  }
}

/* Chart Area */
#chart-container {
  flex: 1.6;
  min-width: 550px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(0,0,0,0.02);
  @media (width <= 800px) {
    min-width: 100%;
  }
}

.legend {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  gap: 16px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.4);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
}

.legend-color {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

/* Details Panel */
#details-panel {
  flex: 1;
  min-width: 320px;
  padding: 32px;
  background-color: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.02);
  position: sticky;
  top: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Guide (Placeholder) */
#details-placeholder {
  color: var(--color-text-sub);
  text-align: center;
  padding: 40px 0;
}

.guide-title {
  font-weight: 700;
  margin-bottom: 24px;
  color: #333;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.guide-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: #f8f9fa;
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid #edf2f7;
  width: 100%;
  max-width: 260px;
  transition: transform 0.2s;
}

.guide-step:hover {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.guide-icon {
  font-size: 1.4rem;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.guide-desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #666;
}

.guide-desc strong {
  color: #333;
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

/* Details Content */
#details-content {
  display: none;
}

.item-title {
    font-size: 1.3rem;
    margin: 16px 0;
    line-height: 1.4;
    color: #222;
    font-weight: 700;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

#details-visual {
    margin: -32px -32px 24px -32px; /* パネル端まで画像を広げる */
    background: #f5f5f5;
    text-align: center;
    overflow: hidden;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    position: relative;
}

#details-image {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain; /* アスペクト比を維持しつつ全体を表示 */
  background: #eee;
  display: block;
  margin: 0 auto;
}

#details-emoji {
  font-size: 80px;
  padding: 60px 0;
  display: block;
  background: #f9fafb;
}

/* Voice Box */
.voice-box {
  background: #f0f9ff;
  border-left: 4px solid var(--color-secondary);
  padding: 24px;
  margin: 24px 0;
  border-radius: 0 16px 16px 0;
  position: relative;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.08);
}

.voice-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.voice-label::before {
  content: '💬';
  font-size: 1rem;
}

.voice-text {
  font-size: 1.15rem;
  color: #1e293b;
  margin: 0;
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

/* Attributes Grid */
.details-attributes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.attr-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attr-item.full-width {
    grid-column: span 2;
}

.attr-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attr-value {
  font-size: 1rem;
  color: var(--color-text-main);
  font-weight: 600;
}

/* AI Insight Box */
.insight-box {
  background: #fff5f8;
  border: 1px solid rgba(199, 21, 133, 0.1);
  border-radius: 20px;
  padding: 24px;
  margin-top: 32px;
  box-shadow: 0 4px 15px rgba(199, 21, 133, 0.04);
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.insight-icon {
  font-size: 1.4rem;
  font-family: 'Noto Color Emoji', sans-serif;
}

.insight-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #C71585;
  letter-spacing: 0.05em;
}

#details-insight {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #4c1d95;
  margin: 0;
}
/* Scrollbar customization */
#details-panel::-webkit-scrollbar {
    width: 6px;
}
#details-panel::-webkit-scrollbar-track {
    background: transparent;
}
#details-panel::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

/* D3 Elements */
.emoji-text {
  dominant-baseline: central;
  text-anchor: middle;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.node-label {
    pointer-events: none;
    text-anchor: middle;
    font-weight: 700;
    fill: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}