@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: optional;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700 800;
  font-display: optional;
  src: url("/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.08);
  --gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
  --dark: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Hide language/offcanvas chrome until opened (also in gz-critical.css) */
.lang-dropdown,
.footer-lang-dropdown,
.offcanvas-menu,
.offcanvas-overlay {
  visibility: hidden;
  pointer-events: none;
}
.lang-dropdown.active,
.lang-switcher.active .lang-dropdown,
.lang-switcher:hover .lang-dropdown,
.footer-lang-switcher:hover .footer-lang-dropdown,
.offcanvas-menu.active,
.offcanvas-overlay.active {
  visibility: visible;
  pointer-events: auto;
}

/* ---------- 共通 ---------- */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3,
h4 {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, "Montserrat", sans-serif;
  color: var(--dark);
  line-height: 1.2;
}

h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

p {
  font-size: 16px;
  margin-bottom: 16px;
}

.label {
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  display: block;
  margin-bottom: 10px;
}

.gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: var(--gradient);
  color: white;
  box-shadow: 0 8px 20px -5px rgba(59, 130, 246, 0.35);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -5px rgba(59, 130, 246, 0.45);
}

.btn.outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--dark);
  box-shadow: none;
}

.btn.outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn.small {
  padding: 10px 20px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

/* フェードイン */
.fade-in,
.fade-in.visible {
  opacity: 1;
  transform: none;
}

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

#gz-header {
  min-height: 112px;
}

/* ---------- ヘッダー ---------- */
header {
  position: sticky;
  top: 0;
  /* トップバナーの直下に固定 */
  width: 100%;
  z-index: 100;
  padding: 20px 0;
  transition: 0.3s;
  background: rgba(255, 255, 255, 0.95);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 800;
  font-size: 20px;
  font-family: "Montserrat", sans-serif;
}

.logo img {
  height: 32px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 15px;
  transition: 0.3s;
}

nav a:hover {
  color: var(--blue);
}

/* ---------- ヒーロー ---------- */
#hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.hero-inner {
  max-width: 550px;
  flex: 1;
}

.hero-graphic {
  flex: 0 0 auto;
  max-width: 480px;
  width: 45%;
}

.hero-graphic img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(59, 130, 246, 0.15));
}

.buttons {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

#hero .bg {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 55%;
  height: 120%;
  background: linear-gradient(135deg,
      rgba(59, 130, 246, 0.05) 0%,
      rgba(45, 212, 191, 0.05) 100%);
  border-radius: 50px;
  transform: rotate(-5deg);
  z-index: 1;
}

/* ---------- 実績 ---------- */
#stats {
  padding: 50px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stats-row .num {
  font-size: 32px;
  font-weight: 800;
  color: var(--dark);
  font-family: "Montserrat", sans-serif;
  margin-bottom: 0;
}

/* ---------- セクション共通 ---------- */
section {
  padding: 80px 0;
}

.heading {
  text-align: center;
  max-width: 550px;
  margin: 0 auto 50px;
}

/* ---------- 商品カード ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.card {
  background: white;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.card-top {
  padding: 24px 24px 16px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-main {
  padding: 0 24px 24px;
  flex-grow: 1;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.yen {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  font-family: "Montserrat", sans-serif;
}

.per {
  font-size: 13px;
  color: var(--muted);
}

.stock {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.stock span {
  color: #f43f5e;
  font-weight: 600;
}

.card-main ul {
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.card-main li {
  font-size: 14px;
  margin-bottom: 8px;
}

.card-bottom {
  padding: 0 24px 24px;
}

/* ---------- 特長 ---------- */
#features {
  background: var(--bg-alt);
}

.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.box {
  background: white;
  padding: 36px;
  border-radius: 18px;
  border: 1px solid var(--border);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.box:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.icon {
  width: 48px;
  height: 48px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 20px;
}

/* ---------- フッター ---------- */
footer {
  background: var(--dark);
  color: white;
  padding: 70px 0 30px;
}

.footer-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 50px;
}

.footer-logo {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-decoration: none;
  display: block;
  margin-bottom: 16px;
}

.footer-logo span {
  color: var(--blue);
}

.brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

footer .links h4,
footer .footer-links h4,
footer .footer-lang-switcher h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding-left: 18px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

footer .links h4::before,
footer .footer-links h4::before,
footer .footer-lang-switcher h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 36px;
  border-radius: 1px;
  background: var(--blue);
}

.links ul {
  list-style: none;
}

.links li {
  margin-bottom: 10px;
}

.links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: 0.3s;
  font-size: 14px;
}

.links a:hover {
  color: white;
}

/* ---------- フッター言語切り替え ---------- */
.footer-lang-switcher {
  position: relative;
}

.footer-lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.footer-lang-current:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.footer-lang-current img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.footer-lang-current .arrow {
  font-size: 10px;
  transition: transform 0.3s;
  margin-left: 4px;
}

.footer-lang-switcher:hover .footer-lang-current .arrow {
  transform: rotate(180deg);
}

.footer-lang-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 1000;
  overflow: hidden;
}

.footer-lang-switcher:hover .footer-lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.footer-lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--dark);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.footer-lang-dropdown a:hover {
  background: var(--bg-alt);
  color: var(--dark);
}

.footer-lang-dropdown a.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.footer-lang-dropdown img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- レスポンシブ ---------- */
/* ---------- 言語切り替え ---------- */
.lang-switcher {
  position: relative;
  margin-left: 20px;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--blue-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
}

.lang-current:hover {
  background: rgba(59, 130, 246, 0.15);
}

.lang-current img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.lang-current .arrow {
  font-size: 10px;
  transition: transform 0.3s;
  margin-left: 4px;
}

.lang-switcher:hover .arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1000;
  overflow: hidden;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.active .lang-dropdown,
.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--dark);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.lang-dropdown a:hover {
  background: var(--bg-alt);
}

.lang-dropdown a.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.lang-dropdown img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

/* ---------- ハンバーガーメニュー ---------- */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.3s;
}

.mobile-menu-btn:hover {
  background: var(--blue-soft);
}

.hamburger {
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--dark);
  border-radius: 1px;
  transition: all 0.3s;
}

.mobile-menu-btn.active .hamburger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- オフキャンバスメニュー ---------- */
.offcanvas-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  visibility: hidden;
  pointer-events: none;
  z-index: 9998;
  transition:
    background 0.3s,
    visibility 0.3s;
}

.offcanvas-menu.active {
  background: rgba(0, 0, 0, 0.5);
  visibility: visible;
  pointer-events: auto;
}

.offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  visibility: hidden;
  pointer-events: none;
  z-index: 9997;
}

.offcanvas-overlay.active {
  visibility: visible;
  pointer-events: auto;
}

.offcanvas-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85%;
  height: 100%;
  background: white;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.offcanvas-menu.active .offcanvas-panel {
  transform: translateX(0);
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.offcanvas-header .user-info {
  flex: 1;
  text-align: center;
}

.offcanvas-header .user-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 4px;
}

.offcanvas-header .user-balance {
  font-size: 13px;
  color: var(--muted);
}

.offcanvas-header .user-balance span {
  color: #f97316;
  /* オレンジ色 */
  font-weight: 700;
}

.offcanvas-close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--muted);
  border-radius: 8px;
  transition: background 0.3s;
}

.offcanvas-close:hover {
  background: var(--border);
}

.offcanvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.offcanvas-nav {
  list-style: none;
}

.offcanvas-nav li {
  border-bottom: 1px solid var(--border);
}

.offcanvas-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 中央寄せ */
  gap: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}

.offcanvas-nav a:hover {
  background: var(--bg-alt);
  color: var(--blue);
}

.offcanvas-nav a svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.offcanvas-nav a:hover svg {
  color: var(--blue);
}

.offcanvas-nav .divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.offcanvas-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.offcanvas-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  transition: border-color 0.3s;
}

.offcanvas-lang-btn:hover {
  border-color: var(--blue);
}

.offcanvas-lang-btn img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {

  .features-row,
  .stats-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-row {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  #hero {
    text-align: center;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-container {
    flex-direction: column;
    gap: 32px;
  }

  .hero-inner {
    margin: 0 auto;
    max-width: 100%;
  }

  .hero-graphic {
    width: 70%;
    max-width: 280px;
    margin: 0 auto;
  }

  .buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
    z-index: 1001;
    position: relative;
    /* 必要に応じて */
  }

  header .wrap {
    justify-content: center;
    position: relative;
  }

  header .wrap .mobile-menu-btn {
    position: absolute;
    left: 0;
  }

  header .wrap .logo {
    margin: 0 auto;
  }

  .logo span {
    display: inline;
  }

  .lang-switcher {
    display: none;
  }

  #hero .bg {
    width: 90%;
    right: 5%;
    top: 50%;
    opacity: 0.3;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }

  header {
    padding: 12px 0;
  }

  header.scrolled {
    padding: 10px 0;
  }

  .footer-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .error-messages p {
    font-size: 14px;
  }

  .page-header {
    padding: 100px 0 40px !important;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .page-content {
    padding: 40px 0 60px !important;
  }

  .content-card {
    padding: 20px !important;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .btn.full {
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 12px;
  }

  .logo img {
    height: 28px;
  }

  .hero-graphic {
    width: 80%;
    max-width: 200px;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .page-header p {
    font-size: 14px;
  }
}

/* ---------- ヘッダー認証ボタン ---------- */
nav ul li a.auth-link {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

nav ul li a.login-link {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

nav ul li a.login-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

nav ul li a.register-link {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--dark);
  margin-left: 40px;
}

nav ul li a.register-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- 404エラーページ ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 0 100px;
  background: linear-gradient(135deg,
      rgba(59, 130, 246, 0.03) 0%,
      rgba(45, 212, 191, 0.03) 100%);
}

.error-content {
  text-align: center;
  max-width: 600px;
}

.error-icon {
  color: var(--blue);
  margin-bottom: 24px;
}

.error-icon svg {
  width: 96px;
  height: 96px;
}

.error-code {
  font-size: clamp(80px, 15vw, 150px);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 16px;
}

.error-content h2 {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 20px;
  color: var(--dark);
}

.error-content p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .error-page {
    padding: 120px 0 60px;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  .error-actions .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* 多言語エラーメッセージ */
.error-messages {
  text-align: center;
}

.error-messages p {
  margin-bottom: 24px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
}

@media (min-width: 768px) {
  .error-messages p {
    font-size: 22px;
  }
}

.error-messages a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
}

.error-messages a:hover {
  color: var(--dark);
}

/* ---------- トップバナー ---------- */
.top-banner {
  position: relative;
  /* 通常フローで配置 */
  z-index: 101;
  background: url("/img/package/top-banner-bg.webp") no-repeat center center;
  background-size: cover;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* bodyのpadding-topは不要（トップバナーが通常フローなので） */

.top-banner .content {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.top-banner .btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 20px;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.top-banner .btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 600px) {
  .top-banner {
    padding: 10px 12px;
    gap: 10px;
  }

  .top-banner .content {
    font-size: 12px;
  }

  .top-banner .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ---------- 言語オフキャンバス ---------- */
.offcanvas-lang {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  /* ハンバーガーメニューより少し広め */
  max-width: 320px;
  height: 100%;
  background: #fff;
  z-index: 1051;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.offcanvas-lang.active {
  transform: translateX(0);
}

.offcanvas-lang-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.offcanvas-lang-header .btn-prev {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offcanvas-lang-header .btn-prev svg {
  width: 24px;
  height: 24px;
  stroke: var(--text);
}

.offcanvas-lang-header .title {
  font-weight: 700;
  font-size: 16px;
  color: var(--dark);
}

.offcanvas-lang-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.offcanvas-lang-body .lang-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--bg-alt);
  transition: background 0.2s;
}

.offcanvas-lang-body .lang-item:hover {
  background: var(--bg-alt);
}

.offcanvas-lang-body .lang-item img {
  width: 28px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  margin-right: 12px;
}

.offcanvas-lang-body .lang-item span {
  font-size: 15px;
}

/* メインメニューヘッダーの言語ボタン */
.offcanvas-header .btn-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.offcanvas-header .btn-lang:hover {
  background: var(--border);
}

.offcanvas-header .btn-lang img {
  width: 28px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
}

/* ========================================
   Header User Area (SNSHelper Style)
   ======================================== */
.header-favorites-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border-radius: 50%;
  color: #4a5568;
  text-decoration: none;
}

.header-favorites-link:hover {
  background: var(--bg-alt, #f5f5f5);
  color: #e33f52;
}

.header-favorites-link svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.header-user-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 通知ボタン */
.header-noti-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
  position: relative;
}

.header-noti-btn:hover {
  background: var(--bg-alt, #f5f5f5);
}

.header-noti-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--muted, #6b7280);
}

.header-noti-btn:hover svg {
  stroke: var(--dark, #1f2937);
}

/* 通知バッジ（未読がある場合用） */
.header-noti-btn.active::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #f97316;
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ユーザードロップダウン */
.header-user-dropdown {
  position: relative;
}

.header-user-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.header-user-toggle:hover {
  background: var(--bg-alt, #f5f5f5);
}

.header-username {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.header-balance-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #f97316;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

/* ドロップダウンメニュー */
.header-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 200;
}

.header-user-dropdown:hover .header-user-menu,
.header-user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-user-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--dark, #1f2937);
  text-decoration: none;
  transition: background 0.2s;
}

.header-user-menu a:hover {
  background: var(--bg-alt, #f5f5f5);
}

.header-user-menu hr {
  margin: 4px 12px;
  border: none;
  border-top: 1px solid var(--border, #e5e7eb);
}

/* モバイルでは非表示（オフキャンバスで表示するため） */
@media (max-width: 1024px) {
  .header-favorites-link {
    display: none;
  }

  .header-user-area {
    display: none;
  }
}

/* Keep the desktop navigation left of the account controls, with those controls grouped at the right. */
@media (min-width: 1025px) {
  header:has(.header-favorites-link) .wrap {
    justify-content: flex-start;
  }

  header:has(.header-favorites-link) .wrap > nav {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: clamp(44px, 4vw, 68px);
  }

  header:has(.header-favorites-link) .wrap > nav ul {
    gap: clamp(16px, 2vw, 28px);
  }

  header:has(.header-favorites-link) .wrap > nav a {
    font-size: 15px;
    font-weight: 600;
  }

  header:has(.header-favorites-link) .wrap > .header-favorites-link {
    flex: 0 0 40px;
    margin: 0 0 0 auto;
  }

  header:has(.header-favorites-link) .wrap > .header-user-area {
    flex: 0 0 auto;
    gap: 6px !important;
    margin-left: 0;
  }
}

/* SNSHelper風 username スタイル調整 */
.header-username {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #333 !important;
  letter-spacing: normal;
}

.header-user-toggle {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
}

/* SNSHelper完全再現 */
.header-noti-btn svg {
  width: 24px !important;
  height: 24px !important;
  stroke: #4a5568 !important;
  stroke-width: 1.8 !important;
}

.header-user-area {
  gap: 6px !important;
}

.header-user-toggle {
  gap: 10px !important;
}

.header-balance-badge {
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* 読み込み中はユーザー情報を非表示 */
.header-user-area {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.header-user-area.loaded {
  opacity: 1;
}

/* 統一されたauth-linksスタイル（navスタイルに合わせる） */
.header-auth-links {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.header-auth-links .auth-link {
  padding: 10px 20px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  text-decoration: none;
  transition:
    transform 0.3s,
    box-shadow 0.3s !important;
}

.header-auth-links .login-link {
  background: var(--gradient) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

.header-auth-links .login-link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35) !important;
  background: var(--gradient) !important;
}

.header-auth-links .register-link {
  background: transparent !important;
  border: 2px solid var(--border) !important;
  color: var(--dark) !important;
}

.header-auth-links .register-link:hover {
  background: var(--bg-alt) !important;
  border-color: var(--muted) !important;
}

/* モバイルではauth-linksを非表示（オフキャンバスメニューで代替） */
@media (max-width: 1024px) {
  .header-auth-links {
    display: none !important;
  }

  /* モバイルではオフキャンバスメニュー内で表示 */
}

/* デスクトップでは表示 */
@media (min-width: 1025px) {
  .header-auth-links {
    display: flex !important;
  }
}

/* 初期状態：両方非表示、JSで切り替え */
.header-user-area,
.header-auth-links {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.header-user-area.visible,
.header-auth-links.visible {
  opacity: 1;
}

/* 非表示時はスペースも消す */
.header-user-area:not(.visible),
.header-auth-links:not(.visible) {
  display: none !important;
}

.header-user-area.visible {
  display: flex !important;
  opacity: 1 !important;
}

.header-auth-links.visible {
  display: flex !important;
  opacity: 1 !important;
}

/* トップページ以外ではページ読み込みアニメーションを無効 */
body.no-page-animation .fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: none !important;
}

body.no-page-animation .fade-in.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* モバイルでは.visibleでも非表示（ハンバーガーメニュー使用） */
@media (max-width: 1024px) {

  .header-user-area,
  .header-user-area.visible,
  .header-auth-links,
  .header-auth-links.visible {
    display: none !important;
    opacity: 0 !important;
  }
}

/* モーダル基本スタイル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal .modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 32px;
  z-index: 1;
}

.modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.modal .form-group {
  margin-bottom: 16px;
}

.modal .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

.modal .form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

.modal h2 {
  margin-bottom: 24px;
  font-size: 22px;
}

.modal .btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.modal .modal-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.modal .modal-switch a {
  color: var(--blue);
}

/* product.html 専用モーダル */
#modalOverlay.modal-overlay {
  display: none;
  padding: 0;
  z-index: 10000;
}

#modalOverlay.modal-overlay.active {
  display: block;
}

#productModal.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  z-index: 10001;
  overflow: hidden;
}

#productModal.modal.active {
  display: block;
}

#productModal .modal-close-top {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#productModal .modal-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

#productModal .modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 64px;
}

#productModal .modal-icon svg {
  width: 34px;
  height: 34px;
}

#productModal .modal-category-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #111827;
}

#productModal .modal-body {
  padding: 22px 24px 24px;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

#productModal .product-form {
  width: 100%;
}

#productModal .form-group {
  margin-bottom: 16px;
}

#productModal .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

#productModal .form-select,
#productModal .quantity-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111827;
}

#productModal .loading-spinner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 600;
}

#productModal .product-details {
  display: none;
}

#productModal .product-details.active {
  display: block;
}

#productModal .product-description {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  white-space: normal;
}

#productModal .product-description .desc-heading {
  margin: 0;
  line-height: 1.4;
  color: #0f172a;
}

#productModal .product-description .desc-heading-large {
  font-size: 20px;
  font-weight: 800;
}

#productModal .product-description .desc-heading-medium {
  font-size: 17px;
  font-weight: 700;
}

#productModal .product-description .desc-heading-small {
  font-size: 15px;
  font-weight: 700;
}

#productModal .product-description .desc-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #334155;
}

#productModal .product-description .desc-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 6px 0;
}

#productModal .product-description .desc-spacer {
  height: 4px;
}

#productModal .product-price-display,
#productModal .total-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
}

#productModal .price-label,
#productModal .total-label {
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

#productModal .price-value,
#productModal .total-value {
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

#productModal .quantity-row {
  display: grid;
  gap: 8px;
}

#productModal .quantity-hint {
  font-size: 12px;
  color: #64748b;
}

#productModal .purchase-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#productModal .purchase-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#productModal .purchase-btn:not(:disabled):hover {
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.35);
}

#productModal .purchase-actions,
#resultModal .purchase-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  padding: 12px 0 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 28%);
}

#productModal .purchase-notice {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

#resultModal.modal {
  display: none;
}

#resultModal.modal.active {
  display: flex;
}

#resultModal .bought-items-list {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  max-height: 240px;
  overflow: auto;
}

@media (max-width: 768px) {
  #productModal.modal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    border-radius: 14px;
  }

  #productModal .modal-close-top {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  #productModal .modal-category-header {
    padding: 16px 16px 12px;
    gap: 10px;
  }

  #productModal .modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex-basis: 46px;
  }

  #productModal .modal-icon svg {
    width: 26px;
    height: 26px;
  }

  #productModal .modal-category-title {
    font-size: 20px;
  }

  #productModal .modal-body {
    padding: 14px 16px 16px;
    max-height: calc(100vh - 150px);
  }

  #productModal .price-value,
  #productModal .total-value {
    font-size: 18px;
  }
}

/* ドロップダウンメニューのホバー領域修正 */
.header-user-menu {
  top: 100% !important;
  padding-top: 16px !important;
}

.header-user-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

/* 言語切り替えドロップダウンのホバー領域修正 */
.lang-dropdown {
  margin-top: 0 !important;
  padding-top: 16px !important;
}

.lang-dropdown::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

/* ============================================================
   ログインモーダル・ログインページ 統合スタイル (SNSHelper風)
   ============================================================ */

/* --- ベースモーダルスタイル --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 48px 32px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 36px;
  color: #9ca3af;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition:
    background 0.2s,
    color 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 40px 48px 48px;
}

.modal-body .form-group {
  margin-bottom: 24px;
}

.modal-body .remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

.modal-body .form-group input,
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"] {
  width: 100%;
  padding: 20px 24px;
  font-size: 18px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
}

.modal-body .remember-me input[type="checkbox"] {
  width: auto;
  padding: 0;
  border: 0;
}

.modal-body .form-group input:focus,
.modal-body input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.modal-body .btn-submit,
.modal-body button[type="submit"] {
  width: 100%;
  padding: 20px 32px;
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  margin-top: 8px;
}

.modal-body .btn-submit:hover,
.modal-body button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.modal-links {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.modal-links a {
  font-size: 16px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

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

.alert {
  padding: 18px 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.alert-error {
  background: #7f1d1d;
  color: #ffffff;
  border: 3px solid #ef4444;
  box-shadow: 0 6px 20px rgba(127, 29, 29, 0.35);
}

.alert-success {
  background: #14532d;
  color: #ffffff;
  border: 3px solid #22c55e;
  box-shadow: 0 6px 20px rgba(22, 101, 52, 0.35);
}

.modal-body .alert-success,
#loginSuccess {
  background: #14532d;
  color: #ffffff;
  border: 3px solid #22c55e;
  box-shadow: 0 6px 20px rgba(22, 101, 52, 0.35);
}

.modal-body .alert-error,
#loginError {
  background: #7f1d1d;
  color: #ffffff;
  border: 3px solid #ef4444;
  box-shadow: 0 6px 20px rgba(127, 29, 29, 0.35);
}

/* --- ログイン/登録ページ --- */
.login-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  background: linear-gradient(135deg,
      rgba(59, 130, 246, 0.03) 0%,
      rgba(45, 212, 191, 0.03) 100%);
}

.login-page .login-container {
  width: 100%;
  max-width: 900px;
}

.login-page .login-card {
  background: #fff;
  border-radius: 28px;
  padding: 80px 100px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.login-page .login-header {
  text-align: center;
  margin-bottom: 48px;
}

.login-page .login-logo {
  font-family: "Montserrat", sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #111827;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 12px;
}

.login-page .login-logo span {
  color: #3b82f6;
}

.login-page .login-header .muted {
  font-size: 20px;
  color: #6b7280;
  margin-top: 8px;
}

.login-page .auth-tabs {
  display: flex;
  background: #f3f4f6;
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 40px;
}

.login-page .auth-tab {
  flex: 1;
  text-align: center;
  padding: 18px 32px;
  font-size: 18px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s;
}

.login-page .auth-tab:hover {
  color: #374151;
}

.login-page .auth-tab.active {
  background: #fff;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-page .login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-page .form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-page .form-group label {
  font-size: 17px;
  font-weight: 600;
  color: #374151;
}

.login-page .form-control {
  padding: 20px 24px;
  font-size: 18px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.login-page .form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-page .remember-me {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  cursor: pointer;
}

.login-page .btn.full {
  width: 100%;
  padding: 20px;
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.login-page .btn.full:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.login-page .login-footer {
  text-align: center;
  margin-top: 40px;
}

.login-page .divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.login-page .divider::before,
.login-page .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.login-page .divider span {
  padding: 0 20px;
  font-size: 16px;
  color: #9ca3af;
}

.login-page .signup-link {
  font-size: 18px;
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
}

.login-page .signup-link:hover {
  text-decoration: underline;
}

/* --- モバイル対応 --- */
@media (max-width: 768px) {
  .modal-box {
    max-width: 100%;
    margin: 16px;
    border-radius: 16px;
  }

  .modal-header {
    padding: 24px 28px 20px;
  }

  .modal-header h2 {
    font-size: 24px;
  }

  .modal-close {
    font-size: 28px;
    width: 40px;
    height: 40px;
  }

  .modal-body {
    padding: 24px 28px 32px;
  }

  .modal-body .form-group input,
  .modal-body input[type="text"],
  .modal-body input[type="email"],
  .modal-body input[type="password"] {
    padding: 16px 18px;
    font-size: 16px;
  }

  .modal-body .btn-submit,
  .modal-body button[type="submit"] {
    padding: 16px;
    font-size: 17px;
  }

  .modal-links {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .login-page {
    padding: 100px 16px 40px;
  }

  .login-page .login-card {
    padding: 40px 28px;
    border-radius: 20px;
  }

  .login-page .login-logo {
    font-size: 32px;
  }

  .login-page .login-header .muted {
    font-size: 16px;
  }

  .login-page .auth-tabs {
    margin-bottom: 28px;
  }

  .login-page .auth-tab {
    padding: 14px 16px;
    font-size: 15px;
  }

  .login-page .form-group label {
    font-size: 15px;
  }

  .login-page .form-control {
    padding: 16px 18px;
    font-size: 16px;
  }

  .login-page .btn.full {
    padding: 16px;
    font-size: 17px;
  }

  .login-page .signup-link {
    font-size: 16px;
  }
}

/* ============================================================
   Premium Theme (migrated from gz-premium.css)
   Applies only to pages with `body.premium-theme`.
   ============================================================ */
body.premium-theme {
  --p-blue: #3b82f6;
  --p-blue-dark: #1d4ed8;
  --p-cyan: #2dd4bf;
  --p-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
  --p-bg: #ffffff;
  --p-bg-soft: #f8fafc;
  --p-text: #1e293b;
  --p-text-muted: #64748b;
  --p-border: #e2e8f0;
  --p-glass: rgba(255, 255, 255, 0.7);
  --p-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  --p-radius: 24px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, "Inter", sans-serif;
  font-size: 18px;
  color: var(--p-text);
  line-height: 1.8;
  background-color: var(--p-bg);
  overflow-x: hidden;
}

body.premium-theme .wrap-p {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

body.premium-theme h1,
body.premium-theme h2,
body.premium-theme h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.premium-theme h1 {
  font-size: 72px;
  line-height: 1.1;
}

body.premium-theme h2 {
  font-size: 48px;
  margin-bottom: 24px;
}

body.premium-theme #hero-p {
  padding: 180px 0 140px;
  background: radial-gradient(circle at top right,
      rgba(59, 130, 246, 0.08),
      transparent),
    radial-gradient(circle at bottom left,
      rgba(45, 212, 191, 0.08),
      transparent);
  position: relative;
}

body.premium-theme .hero-glass-card {
  background: var(--p-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--p-radius);
  padding: 60px;
  box-shadow: var(--p-shadow);
  max-width: 800px;
}

body.premium-theme .label-p {
  display: inline-block;
  padding: 6px 16px;
  background: var(--p-blue-soft, rgba(59, 130, 246, 0.1));
  color: var(--p-blue);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
  margin-bottom: 24px;
}

body.premium-theme .btn-p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 48px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  cursor: pointer;
  border: none;
}

body.premium-theme .btn-p-primary {
  background: var(--p-gradient);
  color: white;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

body.premium-theme .btn-p-primary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

body.premium-theme .btn-p-outline {
  background: transparent;
  border: 2px solid var(--p-border);
  color: var(--p-text);
}

body.premium-theme .btn-p-outline:hover {
  border-color: var(--p-blue);
  color: var(--p-blue);
  background: rgba(59, 130, 246, 0.02);
}

body.premium-theme #stats-p {
  padding: 80px 0;
  background: var(--p-bg-soft);
  border-top: 1px solid var(--p-border);
}

body.premium-theme .stats-grid-p {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

body.premium-theme .stat-item-p {
  text-align: center;
}

body.premium-theme .stat-num-p {
  font-size: 64px;
  font-weight: 800;
  background: var(--p-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  line-height: 1;
  margin-bottom: 12px;
}

body.premium-theme .stat-label-p {
  font-size: 18px;
  color: var(--p-text-muted);
}

body.premium-theme .products-section-p {
  padding: 140px 0;
}

body.premium-theme .cards-grid-p {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 48px;
  margin-top: 60px;
}

body.premium-theme .card-p {
  background: white;
  border-radius: var(--p-radius);
  padding: 48px;
  border: 1px solid var(--p-border);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

body.premium-theme .card-p:hover {
  transform: translateY(-12px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08);
  border-color: var(--p-blue);
}

body.premium-theme .card-p::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--p-gradient);
  opacity: 0;
  transition: opacity 0.4s;
}

body.premium-theme .card-p:hover::before {
  opacity: 1;
}

body.premium-theme .card-price-p {
  font-size: 48px;
  font-weight: 800;
  color: var(--p-text);
  margin: 24px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

body.premium-theme .card-price-p span {
  font-size: 24px;
  color: var(--p-text-muted);
  font-weight: 500;
}

body.premium-theme .card-features-p {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  flex-grow: 1;
}

body.premium-theme .card-features-p li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--p-text-muted);
}

body.premium-theme .card-features-p svg {
  color: var(--p-cyan);
  flex-shrink: 0;
}

body.premium-theme .fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body.premium-theme .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  body.premium-theme h1 {
    font-size: 48px;
  }

  body.premium-theme .hero-glass-card {
    padding: 40px;
  }

  body.premium-theme .cards-grid-p {
    grid-template-columns: 1fr;
  }
}

#products .cards.simple-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 20px;
}

#products .simple-card {
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#products .simple-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

#products .simple-card .card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #eef2f7;
  overflow: hidden;
}

#products .simple-card .card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#products .simple-card .media-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #0ea5e9;
  color: #fff;
}

#products .simple-card .card-top {
  padding: 14px 16px 0;
}

#products .simple-card .tag {
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #0ea5e9;
  color: #fff;
}

#products .simple-card h3 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

#products .simple-card .card-main {
  padding: 10px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

#products .simple-card .card-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

#products .simple-card .card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

#products .simple-card .price {
  margin: 0;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}

#products .simple-card .yen,
#products .simple-card .amount {
  color: #7c3aed;
}

#products .simple-card .yen {
  font-size: 20px;
}

#products .simple-card .amount {
  font-size: 36px;
  line-height: 1;
}

#products .simple-card .per {
  font-size: 14px;
  color: #6b7280;
}

#products .simple-card .stock {
  display: none;
}

#products .simple-card .buy-btn {
  width: auto;
  min-width: 112px;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  box-shadow: none;
}

#products .simple-card .buy-btn:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.04);
}

@media (max-width: 767px) {
  #products .cards.simple-cards {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

/* ---------- スマホ用下部ナビ ---------- */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1100;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body.has-mobile-bottom-nav {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav__link {
    display: flex;
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 12px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav__link svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-bottom-nav__link.is-active {
    color: var(--blue);
  }

  .mobile-bottom-nav__link:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
  }
}
