/* base.css — リセット・共通スタイル */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-weight: var(--font-weight-regular);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ===========================
   スクロールフェードイン
=========================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===========================
   売上推移グラフ モーダル
=========================== */

#sales-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

#sales-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

#sales-modal__content {
  position: relative;
  width: calc(100% - var(--space-m) * 2);
  max-width: 640px;
  margin: 10vh auto 0;
  background-color: var(--color-bg);
  border-radius: var(--radius-m);
  padding: var(--space-l) var(--space-m) var(--space-m);
  box-sizing: border-box;
}

#sales-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

#sales-chart {
  width: 100% !important;
  max-height: 60vh;
}

@media (max-width: 767px) {
  #sales-modal__content {
    margin-top: 15vh;
  }
}
