@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

:root {
  /* 共通 */
  --font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* PC用変数 */
  --h1-font-size-pc: 36px;
  --h1-line-height-pc: 43.2px;
  --h2-font-size-pc: 24px;
  --h2-line-height-pc: 33.6px;
  --body-font-size-pc: 14px;
  --body-line-height-pc: 22.4px;
  --bold-font-size-pc: 14px;
  --caption-font-size-pc: 12px;
  --caption-line-height-pc: 18px;

  /* SP用変数 */
  --h1-font-size-sp: 24px;
  --h1-line-height-sp: 31.2px;
  --h2-font-size-sp: 20px;
  --h2-line-height-sp: 27px;
  --body-font-size-sp: 15px;
  --body-line-height-sp: 22px;
  --bold-font-size-sp: 15px;
  --caption-font-size-sp: 12px;
  --caption-line-height-sp: 18px;
}

body {
  font-family: var(--font-family);
  font-size: var(--body-font-size-sp);
  line-height: var(--body-line-height-sp);
  background-color: #f5f5f5;
  padding-top: 70px;
}

h1 {
  font-size: var(--h1-font-size-sp);
  line-height: var(--h1-line-height-sp);
  text-align: center;
  width: calc(100% - 32px);
  max-width: 320px;
  margin: 0 auto;
  padding: 32px 0;
}

h2 {
  font-size: var(--h2-font-size-sp);
  line-height: var(--h2-line-height-sp);
  text-align: center;
}

p {
  font-size: var(--body-font-size-sp);
  line-height: var(--body-line-height-sp);
  text-align: center;
}

.caption {
  font-size: var(--caption-font-size-sp);
  line-height: var(--caption-line-height-sp);
  text-align: center;
}

.bold {
  font-weight: bold;
  font-size: var(--bold-font-size-sp);
}

/* ヘッダー */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #242424;
  height: 70px;
  padding: 36px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  z-index: 100;
}

/* ヘッダー内の共通スタイル */
.header-nav,
.header-actions {
  display: flex;
  align-items: center;
}

.header-nav {
  gap: 32px;
}

.header-actions {
  gap: 0;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo {
  height: 26px;
  width: 59px;
  display: block;
}

.nav-menu {
  display: flex;
  gap: 24px;
}

.nav-item {
  color: #9E9E9E;
  text-decoration: none;
  font-size: 14px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: opacity 0.2s;
}

.nav-item.active {
  color: #f0f0f0;
  border-bottom-color: #f0f0f0;
  font-weight: bold;
}

.nav-item:hover {
  opacity: 0.8;
}

.nav-tabs {
  display: none;  /* SPでは非表示 */
}

.download-button {
  display: none;  /* SPでは非表示 */
  padding: 6px 16px;
  border: 1px solid #f0f0f0;
  border-radius: 40px;
  background-color: transparent;
  color: #f6f6f6;
  font-size: 14px;
  font-weight: 600;
  line-height: 22.4px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.download-button:hover {
  opacity: 0.85;
}

.is-hidden {
  display: none;
}

.menu-button {
  display: block;  /* SPでは表示 */
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  line-height: 0;
}

.menu-icon {
  width: 27px;
  height: 18px;
  display: block;
}

.container-wrapper {
  padding: 0 16px;
  margin: 0 auto;
}

.container-white {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto 32px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}

/* フッター */
footer {
  background-color: #e7e7e7;
  padding: 32px 32px;
  text-align: center;
  margin-top: 32px;
}

/* フッターを最下部にレイアウトするためのCSS */
body:has(.footer-bottom) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.footer-bottom) main {
  flex: 1;
  display: block;
  width: 100%;
}

.footer-bottom {
  margin-top: auto;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 26px;
  justify-content: center;
}

.footer-links a {
  color: #242424;
  text-decoration: none;
  font-size: var(--caption-font-size-sp);
  line-height: var(--caption-line-height-sp);
  text-align: center;
  white-space: nowrap;
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-download-text {
  font-size: var(--bold-font-size-pc); /* 14pxを設定したいので敢えてPC用の変数を使用 */
  margin-bottom: 6px;
  padding: 0;
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.footer-app-links {
  display: flex;
  justify-content: center;
  gap: 6px; 
  margin-bottom: 16px;
  padding: 0 26px;
}

.footer-app-links img {
  height: 48px;
  width: auto;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: -75%;
  width: 75%;
  height: 100%;
  background-color: #242424;
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drawer-menu.is-open {
  right: 0;
}

.drawer-menu-header {
  height: 70px;
  padding: 36px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  box-sizing: border-box;
}

.close-menu-button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  line-height: 0;
}

.menu-close-icon {
  width: 20px;
  height: 20px;
  color: #F6F6F6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-close-icon::before {
  content: "\F659";
  font-family: "bootstrap-icons";
  font-size: 20px;
}

.drawer-menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.drawer-menu-nav {
  flex: 1;
}

.drawer-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  text-decoration: none;
  color: #f0f0f0;
  font-size: var(--body-font-size-sp);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-menu-arrow {
  display: flex;
  align-items: center;
}

.drawer-menu-arrow img {
  width: 8px;
  height: 13px;
}

.drawer-download-button {
  padding: 0 16px 32px;
  margin-top: auto;
  text-align: center;
}

.drawer-menu .download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 8px 16px;
  border: 1px solid #f0f0f0;
  border-radius: 40px;
  color: #f0f0f0;
  font-size: var(--caption-font-size-sp);
  font-weight: 300;
  line-height: var(--caption-line-height-sp);
  text-decoration: none;
  transition: opacity 0.2s;
  box-sizing: border-box;
}

.drawer-menu .download-button:hover {
  opacity: 0.8;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.drawer-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.progress-steps {
  margin: 0 auto;
  width: 320px;
  padding: 32px 0 0;
  flex-wrap: nowrap;
  display: flex;
  gap: 16px;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #242424;
  flex: 1;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
  font-size: 0; /* テキストノードを非表示に */
}

.progress-steps .step .step-text {
  display: none;    /* SPでは非表示 */
}

.step::before {
  content: attr(data-step-number);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #D9D9D9;
  color: white;
  position: relative;
  z-index: 1;
  font-size: 12px;
}

/* 2ステップの場合と3ステップの場合の線の長さ（width）を調整しないと長さが足りない */
.step::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 105%;
  height: 2px;
  background: #D9D9D9;
  transform: translateX(12px);
}

.progress-steps:has(.step:nth-child(3)) .step::after {
  width: 115%;
}

.step:last-child::after {
  display: none;
}

.step.active::before {
  content: "\F633";
  font-family: bootstrap-icons;
  background: #E43632;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.step.active::after {
  background: #E43632;
}

.step.current::before {
  content: attr(data-step-number);
  border: 1px solid #E43632;
  background: white;
  color: #E43632;
  font-weight: bold;
}

.step.active {
  color: #242424;
}

.step.current {
  color: #242424;
}

.submit-button {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: #111111;
  color: #F6F6F6;
  border: none;
  border-radius: 6px;
  font-size: var(--body-font-size-sp);
  line-height: var(--body-line-height-sp);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submit-button:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-button:active {
  background: #000000;
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.submit-button:disabled {
  background: #9E9E9E;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.submit-button:disabled:hover {
  background: #9E9E9E;
  transform: none;
  box-shadow: none;
}

.uid-display {
  display: none;  /* SPでは非表示 */
  margin-right: 24px;
  color: #f6f6f6;
  font-size: var(--bold-font-size-pc); 
}

.warning-icon {
  color: #E43632;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.warning-icon::before {
  content: "\F33B";
  font-family: "bootstrap-icons";
  font-size: 20px;
}

.close-button {
  font-size: 16px;
  color: #9E9E9E;
  cursor: pointer;
  width: 14px;
  height: 14px;
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
}

.close-button::before {
  content: "\F659";
  font-family: "bootstrap-icons";
}

.message {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  font-weight: bold;
  position: relative;
  min-height: 55px;
  height: auto;
}

.message::before {
  font-family: "bootstrap-icons";
}

.message .close-button {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.message .close-button::before {
  content: "\F659";
  color: inherit;
  opacity: 0.7;
  width: 14px;
  height: 14px;
}

.message .close-button:hover::before {
  opacity: 1;
}

.message.message-error {
  background-color: rgba(228, 54, 50, 0.2);
  color: #E43632;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  font-weight: bold;
}

.message.message-error::before {
  content: "\F33B";
  width: 18px;
  height: 18px;
}

.message.message-info {
  background-color: rgba(31, 94, 195, 0.2);
  color: #1F5EC3;
}

.message.message-info::before {
  content: "\F633";
  width: 18px;
  height: 18px;
}

.message.payment-message {
  padding: 16px 32px 16px 16px;
  font-size: 14px;
  gap: 8px;
  min-height: 55px;
  height: auto;
  margin-bottom: 24px;
}

.price {
  font-size: var(--h2-font-size-sp);
  line-height: var(--h2-line-height-sp);
  display: flex;
  align-items: baseline;
}

.price .unit {
  font-size: var(--body-font-size-sp);
  line-height: var(--body-line-height-sp);
  margin-left: 4px;
}

.info:before {
  font-family: "bootstrap-icons";
  font-size: 24px;
  color: #1D1D1D;
  line-height: 1;
  display: flex;
  align-items: center;
}

.info.credit-card::before {
  content: "\F2DB";
}

.success-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
  width: 100%;
}

.success-action-button {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #D9D9D9;
  border-radius: 100px;
  text-align: center;
  font-size: var(--body-font-size-sp);
  line-height: var(--body-line-height-sp);
  color: #242424;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.success-action-button:hover {
  background: #f8f8f8;
  border-color: #b3b3b3;
  text-decoration: none;
}

.success-action-button:active {
  background: #f0f0f0;
  transform: translateY(1px);
}

body.drawer-open .drawer-uid-display {
  margin-bottom: 8px;
  padding: 0 24px;
  color: #f6f6f6;
  font-size: 12px; 
  text-align: center;
  word-break: break-all;
}

/* レスポンシブ：PC用 */
@media (min-width: 769px) {
  body {
    font-size: var(--body-font-size-pc);
    line-height: var(--body-line-height-pc);
  }

  h1 {
    font-size: var(--h1-font-size-pc);
    line-height: var(--h1-line-height-pc);
    max-width: 680px;
    padding: 64px 0;
  }

  h2 {
    font-size: var(--h2-font-size-pc);
    line-height: var(--h2-line-height-pc);
  }

  p {
    font-size: var(--body-font-size-pc);
    line-height: var(--body-line-height-pc);
  }

  .bold {
    font-size: var(--bold-font-size-pc);
  }

  .caption {
    font-size: var(--caption-font-size-pc);
    line-height: var(--caption-line-height-pc);
  }

  .app-header {
    padding: 36px 36px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    padding: 0;
  }

  .footer-links a {
    font-size: var(--body-font-size-pc);
    line-height: var(--body-line-height-pc);
    white-space: normal;
  }

  .footer-download-text {
    width: auto;
  }

  .footer-app-links {
    padding: 0;
  }

  .progress-steps {
    width: 600px;
    gap: 32px;
    padding: 64px 0 0;
  }

  .step {
    font-size: 12px; /* PCではテキストを表示 */
  }

  .progress-steps .step .step-text {
    display: block;    /* PCではテキストを表示 */
  }

  .container-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .container-white {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 32px;
    margin-bottom: 64px;
  }

  .menu-button {
    display: none;  /* PCでは非表示 */
  }

  .nav-tabs {
    display: flex;  /* PCでは表示 */
  }

  .download-button {
    display: inline-block;  /* PCでは表示 */
  }

  .drawer-menu {
    display: none;  /* PCでは非表示 */
  }

  .submit-button {
    font-size: var(--body-font-size-pc);
    line-height: var(--body-line-height-pc);
  }

  .uid-display {
    display: block;  /* PCでは表示 */
  }

  .price {
    font-size: var(--h2-font-size-pc);
    line-height: var(--h2-line-height-pc);
  }

  .price .unit {
    font-size: var(--body-font-size-pc);
    line-height: var(--body-line-height-pc);
  }

  .success-action-buttons {
    flex-direction: column;
    gap: 16px;
  }

  .success-action-button {
    font-size: var(--body-font-size-pc);
    line-height: var(--body-line-height-pc);
    border-radius: 100px;
    padding-top: 12px;
    padding-bottom: 12px;
    color: #242424;
    text-decoration: none;
  }

}
