@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700&family=Fredoka+One&display=swap');

:root {
  /* Colors - Warm, friendly, ivory base */
  --bg-main: #fcfbfa;
  --bg-sidebar: #f5efe8;
  --bg-header: #ece5df;
  --bg-footer: #9b8c86;
  --bg-ad: #333333;
  --text-main: #3a322d;
  --text-light: #6a5e55;
  --text-white: #ffffff;
  --accent-color: #cd7e73;      /* A soft reddish-brown for accents/hearts */
  --heart-active: #e74c3c;      /* Bright red for WOW effect when favorited */
  --hover-overlay: rgba(0, 0, 0, 0.04);
  --border-color: rgba(90, 80, 70, 0.1);
  --sidebar-width: 260px;
  --radius: 12px;
  --shadow-sm: 0 4px 12px rgba(58, 50, 45, 0.05);
  --shadow-md: 0 8px 30px rgba(58, 50, 45, 0.1);
  --shadow-hover: 0 15px 40px rgba(58, 50, 45, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border-color);
  z-index: 50;
  transition: var(--transition);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
}

/* Sidebar Components */
.brand-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: #2b1f1a;
  text-decoration: none;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-dots {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background: conic-gradient(from 0deg, #ff6b6b, #feca57, #1dd1a1, #5f27cd);
  border-radius: 50%;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  background-color: var(--hover-overlay);
  transform: translateX(5px);
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.login-btn:hover {
  color: var(--accent-color);
}

/* Header (Heart Ribbon) */
.heart-ribbon {
  background-color: var(--bg-header);
  padding: 0.75rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1.5rem;
  color: #fff;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  white-space: nowrap;
}

.heart-ribbon i {
  color: var(--text-main);
  opacity: 0.5;
}

/* Search Area (Advanced) */
.search-container {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.search-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(186, 153, 126, 0.1);
}

.search-icon {
  color: var(--text-light);
  font-size: 1.2rem;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  outline: none;
  background: transparent;
}

.search-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
  margin: 0 1rem;
}

.advanced-search-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.5rem;
  white-space: nowrap;
}

.advanced-search-toggle:hover {
  color: var(--accent-color);
}

.image-search-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.image-search-btn:hover {
  background-color: #faf9f7;
}

/* Popular Tags */
.popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag-chip {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.tag-chip i { font-size: 0.8rem; opacity: 0.7; }
.tag-chip:hover {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* Advanced Search Panel */
.advanced-search-panel {
  position: absolute;
  top: calc(2rem + 50px);
  left: 2rem;
  right: 2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 100;
  padding: 2rem;
  display: none; /* JSでトグル */
  border: 1px solid var(--border-color);
}

.advanced-search-panel::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 170px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.advanced-filter-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: start;
}

.filter-row label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  padding-top: 5px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-options label {
  font-weight: normal;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-select, .filter-text {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  max-width: 300px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform 0.1s;
}

.color-swatch:hover { transform: scale(1.2); }
.color-swatch.active { border: 2px solid var(--accent-color); }

.filter-actions {
  text-align: center;
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.adv-search-exe-btn {
  background-color: #d16270; /* イラストAC風の赤み */
  color: #fff;
  border: none;
  padding: 0.8rem 4rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.search-btn:hover {
  background: #847670;
}

/* Content Sections */
.section {
  padding: 1rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Grid Layout */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.asset-card {
  background: #fff;
  border-radius: var(--radius);
  aspect-ratio: 1;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.asset-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.asset-image-placeholder {
  width: 100%;
  height: 100%;
  background-color: #faf9f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-image-placeholder img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  opacity: 0.8;
  transition: transform 0.3s;
}

.asset-card:hover .asset-image-placeholder img {
  transform: scale(1.05); /* WOW effect image slight zoom */
}

/* Heart Button Micro-animation */
.heart-fav-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.heart-fav-btn:hover {
  transform: scale(1.1);
}

.heart-fav-btn.active {
  color: var(--heart-active);
  animation: heartBump 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* See More Button */
.see-more-wrapper {
  text-align: center;
  margin: 2rem 0;
}

.see-more-btn {
  background-color: var(--bg-footer);
  color: var(--text-white);
  border: none;
  padding: 0.6rem 2.5rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.see-more-btn:hover {
  background-color: #847670;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(155, 140, 134, 0.4);
}

/* News Section */
.news-box {
  background-color: var(--bg-sidebar);
  border-radius: 16px;
  border: 4px solid var(--bg-footer);
  padding: 2rem;
  margin: 3rem auto;
  max-width: 800px;
  position: relative;
}

.news-box::before {
  content: '';
  position: absolute;
  top: 5px; left: 5px; right: 5px; bottom: 5px;
  border: 1px solid var(--bg-footer);
  border-radius: 12px;
  pointer-events: none;
}

.news-list {
  list-style: none;
  margin-top: 1rem;
}

.news-item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(155, 140, 134, 0.3);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-weight: 500;
  color: var(--text-main);
  min-width: 100px;
}

.news-text {
  color: var(--text-main);
  text-decoration: none;
}
.news-text:hover {
  text-decoration: underline;
  color: var(--accent-color);
}

/* Terms Page Format (Left aligned clean text) */
.terms-content {
  background: #fff;
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.terms-content h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--bg-footer);
  padding-bottom: 0.5rem;
}
.terms-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.terms-content ul {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

/* Footer */
.footer {
  background-color: var(--bg-footer);
  color: #fff;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  position: absolute;
  right: 2rem;
  font-size: 2rem;
}
.social-icons a {
  color: #fff;
  transition: transform 0.2s;
}
.social-icons a:hover {
  transform: scale(1.1);
}

/* Detail Page */
.detail-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.detail-title {
  font-size: 1.2rem;
  font-weight: 500;
}

.detail-header-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  gap: 1rem;
}

.detail-top-section {
  display: flex;
  gap: 2rem;
}

.detail-image-wrapper {
  flex: 1;
  background: #faf9f7;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 300px; /* スマホで潰れないように最低高さを確保 */
  max-width: 600px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.detail-image-wrapper img, .detail-image-wrapper svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.detail-actions {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-btn {
  background: #a4968f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  display: block;
}

.download-btn.svg {
  background: #9b8c86;
}

.download-btn:hover {
  background: #847670;
  transform: translateY(-2px);
}

.detail-notice {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.5rem;
}

/* Color Panel */
.color-panel {
  background: #fbf9f6;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.color-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  text-align: center;
}

.cp-parts-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  justify-content: center;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
}

.cp-part-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.cp-part-item.active {
  transform: scale(1.2);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
  z-index: 2;
}

.cp-part-item:after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  display: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.cp-part-item.active:after {
  display: block;
}

.cp-canvas-area {
  position: relative;
  width: 100%;
  aspect-ratio: 2/1;
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  background: #000;
  margin-bottom: 1rem;
}

.cp-picker-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.cp-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.cp-hue-area {
  margin-bottom: 1rem;
}

.cp-hue-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  outline: none;
}

.cp-hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-color);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cp-input-area {
  margin-bottom: 1rem;
}

.cp-hex-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  font-family: inherit;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--text-main);
}

.cp-presets {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.cp-preset {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.cp-preset:hover {
  transform: scale(1.1);
}

.cp-preset.active {
  border-color: var(--text-main);
  transform: scale(1.1);
}

.cp-reset-wrapper {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  text-align: center;
}

.cp-reset-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto;
  transition: var(--transition);
}

.cp-reset-btn:hover {
  background: #fff;
  border-color: var(--text-main);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.detail-description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-main);
  background: #fbf9f6;
  padding: 1.5rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.meta-box {
  background: #fbf9f6;
  padding: 1.5rem;
  border-radius: var(--radius);
}

.meta-box-title {
  font-weight: bold;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.meta-box-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.8;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  aspect-ratio: 1;
}

/* Contact Form */
.contact-container {
  background: #fff;
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  max-width: 600px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.contact-email {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-form {
  background: #fbf9f6;
  padding: 2rem;
  border-radius: var(--radius);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-select, .form-textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
}

.submit-btn {
  background: #a4968f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1rem 3rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  margin: 0 auto;
}

.submit-btn:hover {
  background: #847670;
}

/* About / FAQ Text Common Styles */
.text-section-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 2rem 0 1rem;
}

.text-section-content {
  text-align: center;
  color: var(--text-main);
  line-height: 1.8;
  font-size: 0.95rem;
}

.faq-item {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.faq-q {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.faq-a {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Mobile Hamburger Menu Elements */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-main);
  cursor: pointer;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
}


.heart-ribbon {
  padding-left: 1rem;
  gap: 0.8rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.ribbon-site-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text-light);
}

.ribbon-site-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.8); /* うっすら暗い程度に調整 */
  opacity: 0.6; /* 透明度も少し下げて馴染ませる */
  transition: all 0.2s;
}

.ribbon-site-icon i {
  font-size: 1.5rem; /* 枠に対して適切なサイズ感 */
  color: var(--text-main);
}

.ribbon-site-icon.active {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.ribbon-site-icon.active img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

.ribbon-placeholder {
  width: 32px;
  height: 32px;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #bbb;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
  flex-shrink: 0;
}

/* Responsive (Smartphones) */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-nav-toggle {
    display: block;
    mix-blend-mode: normal;
    background: rgba(255,255,255,0.8);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    top: 0.5rem;
    left: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .heart-ribbon {
    padding-left: 3.5rem; /* スマホのみメニューボタン分あける */
  }

  /* Search Area Mobile */
  .search-container {
    padding: 1rem;
  }

  .search-wrapper {
    flex-direction: column;
    gap: 8px;
  }

  .search-box {
    padding: 0 0.8rem;
  }

  .search-input {
    padding: 0.6rem 0.5rem;
    font-size: 0.95rem;
  }

  .advanced-search-toggle {
    font-size: 0.85rem;
    padding: 0.4rem;
  }

  .image-search-btn {
    padding: 0.8rem;
    justify-content: center;
    font-size: 0.9rem;
  }

  .tag-chip {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
  }

  /* Advanced Search Panel Mobile */
  .advanced-search-panel {
    top: 100px;
    left: 1rem;
    right: 1rem;
    padding: 1.2rem;
  }

  .advanced-search-panel::before {
    display: none; /* 吹き出しの三角を消してスッキリさせる */
  }

  .filter-row {
    grid-template-columns: 1fr; /* 縦並びに変更 */
    gap: 0.5rem;
  }

  .filter-row label {
    padding-top: 0;
  }

  .filter-select, .filter-text {
    max-width: none;
  }

  .color-swatches {
    grid-template-columns: repeat(5, 1fr); /* 5列に増やしてタップしやすく */
    max-width: none;
  }

  .color-swatch {
    width: 100%;
    aspect-ratio: 1;
  }

  .adv-search-exe-btn {
    width: 100%;
    padding: 1rem;
  }

  /* Detail Page Mobile */
  .detail-top-section {
    flex-direction: column;
    gap: 1.5rem;
  }

  .detail-image-wrapper {
    width: 100%;
    max-width: none;
    padding: 1rem;
  }

  .detail-actions {
    width: 100%;
  }

  .download-btn {
    padding: 1rem;
  }

  .color-panel {
    padding: 1rem;
  }

  .meta-grid {
    grid-template-columns: 1fr; /* 3列から1列へ */
    gap: 1rem;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr); /* 3列から2列へ */
  }

  .news-item {
    padding: 1rem;
  }

  .color-panel {
    padding: 1rem;
  }

  .news-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .social-icons {
    position: static;
    margin-top: 1.5rem;
    justify-content: center;
  }

  .footer {
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}
/* Request Page Specific Styles */
.page-title-line {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

.sub-text {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 1.5rem;
}

.main-description {
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.caution-text {
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.custom-outline-btn {
  display: block;
  width: fit-content;
  margin: 0 auto 3rem;
  padding: 0.6rem 2rem;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.custom-outline-btn:hover {
  background: #fdfdfd;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.line-title {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  width: 100%;
  margin-top: 3rem;
}

.gray-box {
  background: #eeeeee;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-main);
}

.form-intro {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.request-form-card {
  background: #f8f6f4;
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.form-item {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.form-textarea-short {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 1rem;
  min-height: 120px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  outline: none;
}

.request-submit-btn {
  background: #a4968f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  margin: 1.5rem auto 0;
  width: 100%;
  max-width: 300px;
}

.request-submit-btn:hover {
  background: #847670;
}

/* --- Illustration Site Theme --- */
body.theme-illust {
  --primary: #f0a693;
  --accent-color: #f0a693;
}

body.theme-illust .main-content {
  background-color: #fff9f5;
}

/* Download Wait Modal (Responsive) */
.dw-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.dw-modal-content {
  background: var(--bg-main, #fff);
  color: var(--text-main, #333);
  padding: 2.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.dw-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.dw-countdown {
  margin-bottom: 1.5rem;
}

.dw-seconds {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary, #a4968f);
}

.dw-text {
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

.dw-adsense {
  width: 100%;
  height: 250px;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #888;
  font-size: 0.9rem;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .dw-modal-content {
    padding: 1.5rem 1rem;
    width: 95%;
  }

  .dw-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .dw-seconds {
    font-size: 2.5rem;
  }

  .dw-text {
    font-size: 1rem;
  }

  .dw-adsense {
    height: 150px; /* Reduce ad height on small phones */
    margin-bottom: 1rem;
  }
}

