/* 和モダンオーガニックグリーン（アップデート版） */

/* ====== Lucide Icons ユーティリティ ====== */
i[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}
.icon-sm i[data-lucide], i[data-lucide].icon-sm { width: 14px; height: 14px; }
.icon-md i[data-lucide], i[data-lucide].icon-md { width: 18px; height: 18px; }
.icon-lg i[data-lucide], i[data-lucide].icon-lg { width: 24px; height: 24px; }
.icon-xl i[data-lucide], i[data-lucide].icon-xl { width: 40px; height: 40px; }
.icon-2xl i[data-lucide], i[data-lucide].icon-2xl { width: 56px; height: 56px; }

:root {
  --color-background: #F9F9F6;
  --color-main: #4C6B5C;
  --color-accent: #A3C9A8;
  --color-highlight: #D6EADF;
  --color-text: #2B2B2B;
  --color-link: #355D4A;
  --color-white: #ffffff;
  --color-error: #D9534F;
  --sel-focus: #4C6B5C;
  --transition-speed: 0.3s;
  --border: #e5e7eb;
  --shadow:0 8px 24px rgba(0,0,0,.08);
}

body {
  max-width: 1400px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding-bottom: 0 !important;
  overflow-x: hidden;
  font-size: 16px;
  font-family: 'Helvetica Neue', sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  width: 100%;
  height: 65vh;
  overflow: hidden;
}

.hero::after{
  content: '';
  display: block;
  clear: both;
  height: 0;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  text-align: center;
  transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
  padding: 2rem;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.slide h1 {
  font-size: 2.2rem;
  margin: 0;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}

.slide p {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}

button { font-size: 16px; color: var(--color-main);}
a { color: var(--color-main); text-decoration: none;}

/* --- BUTTONS --- */
.button {
  display: inline-block;
  background: var(--main);
  color: var(--white);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  margin: 0.3rem;
  border-radius: 8px;
  font-weight: bold;
  transition: all var(--transition-speed) ease-in-out;
}

.button:hover {
  opacity: .7;
}

.button.secondary {
  background-color: var(--color-white);
  border: 1px solid var(--color-accent);
  color: var(--color-main);
}

/* --- SECTIONS --- */
section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features, .products-preview, .blog, .faq {
  background-color: var(--color-highlight);
  border-radius: 12px;
  margin-top: 2rem;
  padding: 2rem;
  overflow-y: hidden;
}

/* --- FEATURES --- */
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.feature {
  flex: 1;
  width: 90%;
  min-width: 240px;
  background: var(--color-white);
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* --- PRODUCTS --- */
.product-cards, .blog-posts {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  margin-bottom: 1.5rem;
}

.product-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 20%;
  min-width: 220px;
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.product-card h3 {
  margin: 0.5rem;
}

.product-card p {
  font-size: 0.9rem;
  padding: 0 0.5rem 1rem;
  color: #555;
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
  cursor: pointer;
}

.faq-question {
  font-weight: bold;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #444;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.faq-item.active .faq-answer {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- FOOTER --- */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 1.5rem 1.8rem;
  background: linear-gradient(135deg, #f0f4f1 0%, #e2ebe4 40%, #f9f9f6 100%);
  border-top: 1px solid rgba(0,0,0,.04);
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: flex-start;
}

/* ブランドブロック */
.site-footer__brand {
  min-width: 0;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .8rem;
  border-bottom: 1px solid #c4c5c7;
  padding-bottom: .8rem;
  width: 80%;
}

.site-footer__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  border-radius: 999px;
  color: var(--color-white);
  font-size: 0.9rem;
  letter-spacing: .12em;
}

.site-footer__logo-mark img {
  width: 100%;
}

.site-footer__logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-link);
}

.site-footer__copytext {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #6b7280;
}

/* ナビゲーションブロック */
.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.site-footer__nav-group {
  min-width: 0;
}

.site-footer__nav-title {
  margin: 0 0 .6rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
}

.site-footer__nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav-group li + li {
  margin-top: .3rem;
}

.site-footer__nav-group a {
  font-size: 0.9rem;
  color: #374151;
  text-decoration: none;
  position: relative;
  padding-bottom: 1px;
}

.site-footer__nav-group a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--color-main);
  transition: width 0.2s ease;
}

.site-footer__nav-group a:hover::after {
  width: 100%;
}

/* ボトムバー */
.site-footer__bottom {
  max-width: 1200px;
  margin: 1.8rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.site-footer__bottom-copy {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.site-footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .8rem;
  font-size: 0.8rem;
}

.site-footer__bottom-links a {
  color: #6b7280;
  text-decoration: none;
}

.site-footer__bottom-links a:hover {
  text-decoration: underline;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .site-footer {
    padding: 2rem 1rem 1.6rem;
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }

  .site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== グローバル .btn コンポーネント ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--color-main, #4C6B5C);
  background: #fff;
  color: var(--color-main, #4C6B5C);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover {
  background: var(--color-highlight, #D6EADF);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-main, #4C6B5C);
  color: #fff;
  border-color: var(--color-main, #4C6B5C);
}
.btn--primary:hover {
  background: #3d5a4b;
  border-color: #3d5a4b;
}

.btn--ghost {
  background: transparent;
  border-color: #d1d5db;
  color: #6b7280;
}
.btn--ghost:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: var(--color-text, #2B2B2B);
}

.btn--danger {
  color: #dc2626;
  border-color: #fecaca;
}
.btn--danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.btn--sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
}

.btn--lg {
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--secondary {
  background: transparent;
  border-color: #d1d5db;
  color: #374151;
}
.btn--secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.btn--warning {
  background: transparent;
  border-color: #fcd34d;
  color: #92400e;
}
.btn--warning:hover {
  background: #fffbeb;
  border-color: #fbbf24;
  color: #78350f;
}

.btn--success {
  background: transparent;
  border-color: #6ee7b7;
  color: #065f46;
}
.btn--success:hover {
  background: #ecfdf5;
  border-color: #34d399;
  color: #064e3b;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- NAVBAR 共通 --- */
.navbar {
  background-color: var(--color-white);
  color: var(--color-main);
  position: fixed;
  top: 0; left: 0;
  z-index: 999;
  width: 100%;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.navbar-container {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  padding-top: 0;
  font-weight: bold;
  text-decoration: none;
}

.navbar-logo img {
  height: 56px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* 右側：アイコン群＋トグル */
.navbar-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ===== Login Status Pills ===== */
.nav-loginstatus__pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--color-highlight);
  color: var(--color-text);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .85rem;
  white-space: nowrap;
}
.nav-loginstatus__pill strong { color: var(--color-main); }
@media (max-width: 768px) {
  .nav-loginstatus--desktop { display: none; }
}

/* ===== Cart Button in Navbar ===== */
.navbar-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-main);
  text-decoration: none;
  padding: .35rem;
  border-radius: 10px;
  transition: background .15s ease, transform .15s ease;
}
.navbar-cart:hover { background: var(--color-highlight); transform: translateY(-1px); }

.cart-icon { display: block; line-height: 0; }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #FF6B6B;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

/* ===== Hamburger Toggle ===== */
.navbar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: background .15s ease;
  gap: 5px;
}
.navbar-toggle:hover { background: var(--color-highlight); }

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-main);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  transform-origin: center;
}

/* X animation when open */
.navbar-toggle.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar-toggle.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.navbar-toggle.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Overlay ===== */
.navbar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.navbar-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ===== Drawer ===== */
.navbar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.1);
  overflow: hidden;
}
.navbar-drawer.is-open {
  transform: translateX(0);
}

/* ===== Drawer: Header (close button) ===== */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem .6rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.drawer-header__title {
  font-size: .8rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.drawer-header__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  color: #666;
  transition: background .15s ease, color .15s ease;
}
.drawer-header__close:hover {
  background: #f3f4f6;
  color: #333;
}

/* ===== Drawer: User Section ===== */
.drawer-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.25rem 1rem;
  background: linear-gradient(135deg, var(--color-main) 0%, #5a7d6a 100%);
  color: #fff;
}
.drawer-user__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drawer-user__avatar svg { stroke: #fff; }
.drawer-user__info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.drawer-user__name {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-user__role {
  font-size: .75rem;
  opacity: .8;
}

/* ===== Drawer: Menu ===== */
.drawer-menu {
  list-style: none;
  margin: 0;
  padding: .5rem 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Single menu item */
.drawer-menu__single {
  margin: 0;
}
.drawer-menu__single > a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background .12s ease, color .12s ease;
  border-left: 3px solid transparent;
}
.drawer-menu__single > a:hover {
  background: var(--color-highlight);
  color: var(--color-main);
  border-left-color: var(--color-main);
}
.drawer-menu__single > a svg {
  flex-shrink: 0;
  stroke: var(--color-main);
  opacity: .7;
}

/* Group */
.drawer-menu__group {
  margin: 0;
  border-top: 1px solid #f0f0f0;
}
.drawer-menu__group:first-child { border-top: none; }

/* Group header */
.drawer-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background .12s ease;
}
.drawer-menu__header:hover {
  background: #fafafa;
}
.drawer-menu__header-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--color-text);
}
.drawer-menu__header-label svg {
  flex-shrink: 0;
  stroke: var(--color-main);
  opacity: .7;
}

/* Chevron */
.drawer-menu__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.drawer-menu__group.is-open .drawer-menu__chevron {
  transform: rotate(-135deg);
}

/* Sub items */
.drawer-menu__items {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.drawer-menu__group.is-open .drawer-menu__items {
  max-height: 600px;
}
.drawer-menu__items li a {
  display: block;
  padding: .55rem 1.25rem .55rem 3.2rem;
  color: #555;
  text-decoration: none;
  font-size: .88rem;
  transition: background .12s ease, color .12s ease, padding-left .12s ease;
  border-left: 3px solid transparent;
}
.drawer-menu__items li a:hover {
  background: var(--color-highlight);
  color: var(--color-main);
  border-left-color: var(--color-accent);
  padding-left: 3.4rem;
}

/* Badge (notification count) */
.drawer-menu__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 .4rem;
  border-radius: 999px;
  background: #FF6B6B;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  margin-left: .4rem;
  line-height: 1;
}

/* Divider (B2B / Admin separator) */
.drawer-menu__divider {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.25rem .3rem 3.2rem;
  list-style: none;
}
.drawer-menu__divider::before,
.drawer-menu__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}
.drawer-menu__divider span {
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-main);
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Seller group accent */
.drawer-menu__group--seller {
  background: linear-gradient(135deg, rgba(163,201,168,.08) 0%, rgba(214,234,223,.12) 100%);
  border-top: 2px solid var(--color-accent);
  border-bottom: 1px solid rgba(163,201,168,.2);
}
.drawer-menu__group--seller .drawer-menu__header-label {
  color: var(--color-main);
  font-weight: 700;
}
.drawer-menu__group--seller .drawer-menu__header-label svg {
  opacity: 1;
}

/* ===== Drawer: Footer (Logout) ===== */
.drawer-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid #eee;
  background: #fafafa;
  flex-shrink: 0;
}
.drawer-footer form { margin: 0; }
.drawer-footer__logout {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .6rem .75rem;
  background: none;
  border: 1px solid #ddd;
  border-radius: 10px;
  color: #777;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.drawer-footer__logout:hover {
  background: #fff0f0;
  border-color: #e8a0a0;
  color: #c0392b;
}
.drawer-footer__logout svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.pulldown{
  /* Reset */
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  /* Box */
  background-color: var(--color-white) !important;
  color: var(--sel-text);
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  padding: .6rem 1.2rem .6rem .9rem !important; /* 右は矢印分広め */
  font-size: 16px; /* iOS自動ズーム防止 */
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .06s ease;
  min-width: 150px; /* 収まり用。任意で調整 */
  background-image: url('../images/pulldown-arrow.svg') !important;
  background-repeat: no-repeat !important;
  background-position: right .7rem center !important;
  background-size: 16px 16px !important;
}
.pulldown:hover{
  border-color: #cfd3da;
}
.pulldown:focus{
  border-color: var(--sel-focus);
}
.pulldown:disabled{
  opacity:.55; cursor: not-allowed;
}

/* 日付入力欄全体を対象とするスタイル */
.flatpickr-input {
  /* Reset: ブラウザのデフォルトスタイルをリセット */
  -webkit-appearance: none;
  appearance: none;
  /* Box: ベースとなるスタイル */
  background-color: var(--color-white) !important;
  color: var(--sel-text);
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  
  /* アイコン分のスペースを右側に確保 */
  padding: .6rem 2.8rem .6rem .9rem !important; 
  /* (アイコンサイズ + アイコンと枠の間のスペース)分を確保 */
  
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .06s ease;
  min-width: 150px;
  
  /* === カレンダーアイコンの配置 === */
  /* SVGファイルのURLを指定 */
  background-image: url('../images/calender.svg') !important; 
  /* 繰り返しなし */
  background-repeat: no-repeat !important;
  /* 右端から 0.7rem の位置に中央揃えで配置 */
  background-position: right .7rem center !important; 
  /* アイコンのサイズ */
  background-size: 18px 18px !important; 
}

/* 状態の変化（ホバー、フォーカス、無効化）はプルダウンと同様に設定 */
.flatpickr-input:hover {
  border-color: #cfd3da;
}
.flatpickr-input:focus {
  border-color: var(--sel-focus);
}
.flatpickr-input:disabled {
  opacity:.55; 
  cursor: not-allowed;
}

/* iOS自動ズーム防止: フォーム要素は16px以上必須 */
input,
textarea,
select,
.ql-editor,
[contenteditable="true"] {
  font-size: 16px;
}

.danger-alert {
  margin: 0;
  color: var(--color-error);
}

.safe-alert {
  margin: 0;
  color: var(--color-accent);
}

/* カード（横スクロール用・コンパクト） */
.products-preview > .product-cards > .card {
  width: 220px;
}

.nm-card{
  background:var(--color-background); border-radius:var(--radius);
  overflow:hidden; box-shadow:var(--shadow); max-width: 380px; min-width:300px; scroll-snap-align: start;
  display:flex;flex-direction:column; transition:transform .2s ease, box-shadow .2s ease;
}
.nm-card:hover{transform:translateY(-2px); box-shadow:0 16px 40px rgba(0,0,0,.10)}

.nm-card__thumb img{display:block; width:100%; height:180px; object-fit:cover}
.nm-card__body{padding:14px 14px 16px}
.nm-card__title{font-size:1.05rem; line-height:1.35; margin:0 0 8px}
.nm-card__title a{color:#111}
.nm-card__meta{display:flex; gap:10px; align-items:center; color:var(--muted); font-size:.9rem; margin-bottom:8px}
.nm-badge{background:#eef2ff; color:#1f2937; padding:.12rem .5rem; border-radius:999px; font-weight:700}
.nm-card__excerpt{color:#374151; margin:0}

/* ===== お知らせベル ===== */
.navbar-notice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem;
  border-radius: 10px;
  color: var(--color-main);
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}

.navbar-notice:hover {
  background: var(--color-highlight);
  transform: translateY(-1px);
}

.notice-icon {
  display: block;
  line-height: 0;
  color: var(--color-main);
}

/* 未読バッジ */
.notice-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #FF6B6B;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
  animation: badge-pulse 1.6s ease-out infinite;
}

/* 未読0のときの控えめなドット */
.notice-dot {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
}

/* さりげない鼓動アニメーション */
@keyframes badge-pulse {
  0%   { transform: translateY(0) scale(1);   box-shadow: 0 0 0 0 rgba(249,115,115,.45); }
  60%  { transform: translateY(-1px) scale(1.05); box-shadow: 0 0 0 6px rgba(249,115,115,0); }
  100% { transform: translateY(0) scale(1);   box-shadow: 0 0 0 0 rgba(249,115,115,0); }
}

/* モバイルで少し大きめに */
@media (max-width: 768px) {
  .notice-badge {
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    top: -5px;
    right: -4px;
  }
}

/* ===== Body scroll lock when drawer is open ===== */
body.drawer-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@media (max-width: 768px) {
  section{
    padding: 1rem .5rem;
  }

  .cart-badge { min-width: 20px; height: 20px; line-height: 20px; font-size: 12px; }

  .navbar-logo img { height: 48px; }

  .feature-list {
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
  }

  .slide h1 {
    font-size: 1.6rem;
  }

  .slide p {
    font-size: 1rem;
  }

  .features, .products-preview, .blog, .faq {
    padding: .5rem;
    padding-bottom: 3rem;
  }
}

/* ===== iOS アプリ対応 ===== */

/* iOS フォントサイズ（自動ズーム回避） */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* タッチターゲット最適化（Apple HIG: 44px最小） */
@media (pointer: coarse) {
  .button,
  .btn,
  button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-link {
    min-height: 44px;
    padding: 10px 12px;
  }

  .nav-item a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* ハンバーガーメニューボタン */
  .burger {
    min-width: 44px;
    min-height: 44px;
  }

  /* リンク要素 */
  a.link,
  .link-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Safe Area 対応（iPhone X以降のノッチ対応） */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  /* フッターのSafe Area */
  footer,
  .footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* スムーズスクロール（iOS Safari対応） */
html {
  -webkit-overflow-scrolling: touch;
}

/* iOS input要素のスタイルリセット */
input,
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
}

/* iOS Safari での position: fixed 対応 */
@supports (-webkit-touch-callout: none) {
  .navbar.fixed,
  .modal {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* 長押しでのテキスト選択無効化（アプリライク） */
.no-select {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 26px; height: 26px;
  margin: 0;
  border: 2px solid var(--muted);
  border-radius: 4px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="checkbox"]:hover{
  border-color: #cfd6dc;
}
input[type="checkbox"]:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(76,107,92,.2); /* var(--c-main) の淡いフォーカス */
}

/* チェック時の配色（サイトトーンに合わせる） */
input[type="checkbox"]:checked{
  border-color: var(--main);
  background: var(--main);
}

/* チェックマーク（SVGパス風） */
input[type="checkbox"]::after{
  content: "";
  width: 10px; height: 18px;
  transform: rotate(45deg) scale(0);
  margin-bottom: .5rem;
  margin-left: .1rem;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transition: transform .12s ease-in-out;
}
input[type="checkbox"]:checked::after{
  transform: rotate(45deg) scale(1);
}