/* ============================
   基本設定（白ベース／余白広め）
   ============================ */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --line: #eaeaea;
  --accent: #111111;
  --badge-new: #111111;
  --badge-sale: #d0021b;
  --focus: #0a84ff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
}


html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.6;
}

/* 画面外テキスト（スクリーンリーダー用） */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* Global loading overlay */
.nm-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}
.nm-loading.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nm-loading__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.nm-loading__spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #d6d6d6;
  border-top-color: var(--accent);
  animation: nm-loading-spin 0.9s linear infinite;
}
.nm-loading__text {
  font-weight: 700;
  letter-spacing: 0.02em;
}
@keyframes nm-loading-spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.nm-toast {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  z-index: 10050;
  pointer-events: none;
}
.nm-toast__panel {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.nm-toast__text { font-size: 14px; }
.nm-toast__close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.nm-toast.is-hidden .nm-toast__panel {
  opacity: 0;
  transform: translateY(-10px);
}

/* Entry loader */
.loader-bg {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.8s ease-in-out;
}
.loader-line {
  width: 0;
  height: 1px;
  background-color: #333;
  animation: lineExpand 1.5s ease-in-out forwards;
}
@keyframes lineExpand {
  0% { width: 0; opacity: 0; }
  50% { width: 100px; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}
body.loaded .loader-bg {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
html.nm-loader-skip .loader-bg {
  display: none;
}
