:root{
  --color-bg-overlay: rgba(0, 0, 0, 0.60);
  --color-panel: #fff;
  --color-text: #333;
  --color-accent-strong: #F64A00;
  --color-accent: #FB8050;
  --color-accent-weak: #FFF6F2;
  --shadow-panel: 0 10px 30px rgba(0,0,0,.15);
}

/* ========= ベース ========= */
* { box-sizing: border-box; }
body.modal-open { overflow: hidden; }

.btn-primary{
  appearance: none; border: 0; border-radius: 9999px;
  padding: 14px 20px; background: var(--color-accent); color: #fff;
  font-weight: 700; letter-spacing: .02em;
}

/* ========= Overlay ========= */
.overlay{
  position: fixed; inset: 0;
  background: var(--color-bg-overlay);
  z-index: 999; opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.overlay.is-active{ opacity: 1; pointer-events: auto; }

/* ========= Modal ========= */
.modal{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
  pointer-events: none;
}
.modal__panel{
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 332px;
  border-radius: 20px;
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
  transform: translateY(24px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease; 
  pointer-events: none;
}
.modal.is-active .modal__panel{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.modal__body{
  padding: 32px 16px;
}
.modal__body--center{
  text-align: center;
  padding: 72px 16px 48px 16px;
}
.modal__title{
  font-size: 20px;
  text-align: center;
  font-weight: 700;
  line-height: 140%;
  color: var(--color-text);
  margin: 64px 0 16px;
}
.modal__title--error{
  color: var(--color-accent-strong);
  text-align: left;
  margin: 0;
}
.modal__caption{
  color: var(--color-text);
  font-size: 14px;
  text-align: center;
  line-height: 140%;
  margin: 0 auto;
}
.modal__text{
  color: var(--color-text);
  font-size: 12px;
  line-height: 140%;
  margin: 0 auto;
}

.modal__actions{
  display:flex;
  justify-content: center;
}

.btn-close{
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--color-accent-weak);
  color: var(--color-accent);
  font-weight: 700;
  border: 2px solid #FED9CA;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.btn-close:hover {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* ========= エラーヘッダー（アイコン + 見出し） ========= */
.error-head{
  display: flex;
  padding-left: 4px;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
}
.error-head img {
  width: 48px;
  height: auto;
}
.error-message-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* ========= アプリ訴求 ========= */
.app-card {
  border-radius: 12px;
  border: 2px solid #FB8050;
  background: #FFF;
  display: flex;
  max-width: 300px;
  padding: 24px 16px;
  margin: 24px 0 28px;
  flex-direction: column;
  align-items: center;
}
.app-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.app-card__head img {
  width: 48px;
  height: auto;
}
.app-card__title{
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.app-card__desc{
  color: var(--color-text);
  text-align: center;
  font-size: 12px;
  line-height: 140%;
  margin: 8px 0 16px;
}
.app-download-btn a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  width: 268px;
  padding: 8px 32px;
  border-radius: 9999px;
  line-height: 130%;
  text-align: center;
  position: relative;
  transition: background-color 0.3s ease;
}

.app-download-btn a span {
  display: block;
}

.app-download-btn a::after {
  content: "▶";
  font-size: 10px;
  color: #fff;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.app-download-btn a:hover {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* ========= Loader ========= */
.loader {
  margin: 12px auto 10px;
  font-size: 15px;
  width: 1em; height: 1em; border-radius: 50%;
  position: relative; text-indent: -9999em;
  -webkit-animation: load5 1.1s infinite ease; animation: load5 1.1s infinite ease;
  -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0);
}
@-webkit-keyframes load5 {
  0%,100%{ box-shadow: 0em -2.6em 0em 0em #5bace9, 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .5), -1.8em -1.8em 0 0em rgba(91,172,233, .7); }
  12.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .7), 1.8em -1.8em 0 0em #5bace9, 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .5); }
  25%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .5), 1.8em -1.8em 0 0em rgba(91,172,233, .7), 2.5em 0em 0 0em #5bace9, 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  37.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .5), 2.5em 0em 0 0em rgba(91,172,233, .7), 1.75em 1.75em 0 0em #5bace9, 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  50%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .5), 1.75em 1.75em 0 0em rgba(91,172,233, .7), 0em 2.5em 0 0em #5bace9, -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  62.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .5), 0em 2.5em 0 0em rgba(91,172,233, .7), -1.8em 1.8em 0 0em #5bace9, -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  75%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .5), -1.8em 1.8em 0 0em rgba(91,172,233, .7), -2.6em 0em 0 0em #5bace9, -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  87.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .5), -2.6em 0em 0 0em rgba(91,172,233, .7), -1.8em -1.8em 0 0em #5bace9; }
}
@keyframes load5 {
  0%,100%{ box-shadow: 0em -2.6em 0em 0em #5bace9, 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .5), -1.8em -1.8em 0 0em rgba(91,172,233, .7); }
  12.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .7), 1.8em -1.8em 0 0em #5bace9, 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .5); }
  25%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .5), 1.8em -1.8em 0 0em rgba(91,172,233, .7), 2.5em 0em 0 0em #5bace9, 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  37.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .5), 2.5em 0em 0 0em rgba(91,172,233, .7), 1.75em 1.75em 0 0em #5bace9, 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  50%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .5), 1.75em 1.75em 0 0em rgba(91,172,233, .7), 0em 2.5em 0 0em #5bace9, -1.8em 1.8em 0 0em rgba(91,172,233, .2), -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  62.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .5), 0em 2.5em 0 0em rgba(91,172,233, .7), -1.8em 1.8em 0 0em #5bace9, -2.6em 0em 0 0em rgba(91,172,233, .2), -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  75%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .5), -1.8em 1.8em 0 0em rgba(91,172,233, .7), -2.6em 0em 0 0em #5bace9, -1.8em -1.8em 0 0em rgba(91,172,233, .2); }
  87.5%{ box-shadow: 0em -2.6em 0em 0em rgba(91,172,233, .2), 1.8em -1.8em 0 0em rgba(91,172,233, .2), 2.5em 0em 0 0em rgba(91,172,233, .2), 1.75em 1.75em 0 0em rgba(91,172,233, .2), 0em 2.5em 0 0em rgba(91,172,233, .2), -1.8em 1.8em 0 0em rgba(91,172,233, .5), -2.6em 0em 0 0em rgba(91,172,233, .7), -1.8em -1.8em 0 0em #5bace9; }
}