@charset "UTF-8";
:root {
  --color-bg: #e7e0d8;
  --color-gray: #F5F5F5;
  --color-footer-bg: #9c6a29;
  --text-black:#101820;
  --color-primary:#b1883a;
  --color-secondary:#FFAB1A;
  --color-danger:#ff0000;
  --color-button:#b1883a;
  --font-langJa:"Noto Sans JP",sans-serif;
  --font-langEn: "Noto Sans JP",sans-serif;
  --font-langNum: "Noto Sans JP",sans-serif;
  --radius-xs: 8px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --ld-bg:#fff;
  --ld-primary:rgb(228, 0, 127);
  --ora-bg:#fff;
  --ora-text:#101820;
  --pv-bg:url(../img/custom/white/bg_share.svg);
  --z-base: 0;
  --z-header: 100;
  --z-overlay: 900;
  --z-modal: 1000;
  --z-tooltip: 2000;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  font-family: var(--font-langJa);
  font-size: 16px;
  line-height: 1.65;
}

.l-header, .l-footer {
  background: var(--color-footer-bg) url(../img/custom/bg_main.svg);
  background-size: 420px;
}

body.white {
  --color-bg: #e7e0d8;
  --color-footer-bg: #9c6a29;
  --color-primary:#b1883a;
  --color-button:#b1883a;
  --scroll-bar:#8c8c8c;
}

body.black {
  --color-bg: #bdc6cb;
  --color-footer-bg: #1a1a1a;
  --color-primary:#8c8c8c;
  --color-button:#1a1a1a;
  --pv-bg:url(../img/custom/black/bg_share.svg);
  --scroll-bar:#8c8c8c;
}

/* header */
.l-header {
  position: relative;
  padding: 0.5em 4%;
}

/* footer */
.l-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 560px;
}

.c-text01 {
  font-size: 16px;
  line-height: 1.5;
}

/* アプリ全体のコンテナ */
.app-container {
  position: relative;
  width: 100vw;
  /* max-width: 350px; */
  height: 100vh;
  height: 100svh;
}

/* カメラと撮影ボタンのコンテナ */
.camera-container {
  position: relative;
  height: 100vh;
  height: 100svh;
}

.camera-container {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-rows: 1fr;
  grid-template-columns: auto;
  grid-template-rows: 55px 1fr 85px;
  gap: 0px 0px;
  grid-template-areas: "g01" "g02" "g03";
}

.camera-container .g01 {
  grid-area: g01;
}

.camera-container .g02 {
  grid-area: g02;
}

.camera-container .g03 {
  grid-area: g03;
}

/* カメラ映像とフレームを重ねるエリア */
.camera-area {
  position: relative;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.camera-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: rgba(255, 255, 255, 0);
  pointer-events: auto;
  -webkit-touch-callout: none;
}

#camera {
  position: absolute;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover; /* スマホ実機のアスペクト比問題に対応 */
  top: 0;
  left: 0;
  z-index: 0;
}
#camera.mirror {
  transform: scaleX(-1);
}

/* 撮影画像サイズは画面の高さに揃える*/
#frame {
  position: absolute;
  top: calc(30 / 1340 * 100%);
  left: calc(30 / 1340 * 100%);
  z-index: 1;
  width: calc(358 / 1340 * 100%);
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  aspect-ratio: 338/336;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-touch-callout: none;
  -moz-user-select: none;
  user-select: none;
}

#frame02 {
  position: absolute;
  top: calc(30 / 1340 * 100%);
  right: calc(30 / 1340 * 100%);
  z-index: 1;
  width: calc(358 / 1340 * 100%);
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  aspect-ratio: 338/336;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-touch-callout: none;
  -moz-user-select: none;
  user-select: none;
}

#frame03 {
  position: absolute;
  bottom: calc(30 / 1340 * 100%);
  left: calc(30 / 1340 * 100%);
  z-index: 1;
  width: calc(358 / 1340 * 100%);
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  aspect-ratio: 338/336;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-touch-callout: none;
  -moz-user-select: none;
  user-select: none;
}

#frame04 {
  position: absolute;
  bottom: calc(30 / 1340 * 100%);
  right: calc(30 / 1340 * 100%);
  z-index: 1;
  width: calc(358 / 1340 * 100%);
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  aspect-ratio: 338/336;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-touch-callout: none;
  -moz-user-select: none;
  user-select: none;
}

#frame-logo {
  position: absolute;
  bottom: calc(30 / 1340 * 100%);
  left: auto;
  right: calc(30 / 1340 * 100%);
  z-index: 3;
  width: calc(613 / 1340 * 100%);
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  aspect-ratio: 613/260;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-touch-callout: none;
  -moz-user-select: none;
  user-select: none;
}

#frame-logo.right {
  left: auto;
  right: calc(30 / 1340 * 100%);
}

#frame-logo.left {
  right: auto;
  left: calc(30 / 1340 * 100%);
}

#frame-chara {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 767px);
  z-index: 2;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-touch-callout: none;
  -moz-user-select: none;
  user-select: none;
}

#frame-chara.left {
  left: 0;
  right: auto;
}

#frame-chara.right {
  right: 0;
  left: auto;
}

/****
* レイヤー順
* 上から　ロゴ、キャラ、フレームの順
**********/
/* 撮影ボタンのエリア */
.control-area {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

/* カメラボタン */
.btn-photograph {
  margin: 0 auto;
  text-align: center;
}

.btn-photograph img {
  display: block;
  width: 70px;
  height: 70px;
}

/* カメラ切り替えボタン */
.btn-change {
  margin-left: auto;
  width: 38px;
  aspect-ratio: 89/75;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.btn-change img {
  display: block;
  width: 100%;
  height: auto;
}

.button01 {
  -webkit-appearance: button;
     -moz-appearance: button;
          appearance: button;
  cursor: pointer;
}

/*　シャッター */
.shutter-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  overflow: hidden;
  transition: opacity 1s ease-in-out;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.shutter-effect.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* フラッシュ */
.shutter-effect .flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* シャッター） */
.shutter-effect .iris-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300vmax;
  height: 300vmax;
  background: #000;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.6s ease-in-out 0.3s, opacity 0.6s ease-in-out 0.3s;
}

/* 発動中 */
.shutter-effect.is-active .flash {
  opacity: 1;
}

.shutter-effect.is-active .iris-circle {
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.9;
}

/* プレビュー内のボタン群 */
.buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.buttons button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background-color: var(--color-button);
  color: white;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.buttons button:hover {
  opacity: 0.8;
}

.button02.btn-share {
  padding: 18px 20px;
  width: calc(121 / 140 * 100%);
}

.button02 span {
  position: relative;
  display: inline-block;
  padding-left: 3.5em;
}

.button02 span::before {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  content: "";
  display: block;
  width: 3em;
  height: 3em;
  background-color: #fff;
  -webkit-mask-image: url(../img/custom/arrow_right.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-image: url(../img/custom/kirakira.svg);
          mask-image: url(../img/custom/kirakira.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.buttons-close {
  margin-top: 30px;
}

.button03 {
  padding: 0.3em 2em;
  border: 1px solid var(--text-black);
  border-radius: 30px;
}

.button03 span {
  position: relative;
  display: inline-block;
  padding-left: 1.5em;
}

.button03 span::before {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  content: "";
  display: block;
  width: 1em;
  height: 1em;
  background-color: var(--text-black);
  -webkit-mask-image: url(../img/common/close.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url(../img/common/close.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.button03:hover {
  opacity: 0.8;
}

/* canvas（非表示） */
#canvas {
  display: none;
}

/* プレビュー画面 */
.preview-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff var(--pv-bg) no-repeat center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 20px 20px 60px;
}

.preview-box {
  max-width: 80vw;
  text-align: center;
}

.preview-container.is-hidden {
  display: none;
}

.preview-container img {
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  background: #fff;
}

.preview-container .buttons {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/**********************
* dialog
***********************/
.c-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  background: var(--ora-bg);
  color: var(--ora-text);
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 999;
  padding: 2em;
  font-size: 1.2em;
}

/**********************
* toast
***********************/
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 2000;
}

.toast.is-show {
  opacity: 1;
}

/**********************
* スタート案内モーダル
***********************/
.mdl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  width: 100%;
  background-color: var(--color-bg);
  padding: 50px calc(25 / 375 * 100%);
  z-index: 999;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-rows: 1fr;
  grid-template-columns: auto;
  grid-template-rows: 1fr 62px;
  gap: 50px 0px;
  grid-template-areas: "g01" "g02";
  opacity: 1;
  transition: ease-in-out opacity 0.5s;
}

.mdl.is-hidden {
  display: none;
  opacity: 0;
}

.mdl-inner {
  margin: auto;
  height: calc(100% - 10px);
  max-width: 767px;
  overflow-y: auto;
}

.mdl-inner::-webkit-scrollbar {
  width: 12px;
}

.mdl-inner::-webkit-scrollbar-thumb {
  background: var(--scroll-bar);
  border-radius: 100px;
}

.mdl-inner::-webkit-scrollbar-track {
  background: #fff;
}

.mdl-inner .g01 {
  grid-area: g01;
}

.mdl-inner .g02 {
  grid-area: g02;
}

.mdl-contents {
  padding: 50px calc(25 / 325 * 100%);
  background-color: #fff;
}

.mdl-agree {
  margin: 0 auto 0;
  max-width: 600px;
  width: 100%;
}

.mdl-agree-button {
  padding: 1em;
  color: #fff;
  background-color: var(--color-button);
  width: 100%;
  text-align: center;
}

.mdl-title01 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.mdl-title02 {
  font-size: 18px;
  font-weight: 700;
}

* + .mdl-title01 {
  margin-top: 1em;
}

* + .mdl-title02 {
  margin-top: 1em;
}

.mdl-title01 + * {
  margin-top: 1em;
}

.mdl-title02 + * {
  margin-top: 1em;
}

.mdl-title02 {
  margin-top: 1em;
}

.list01 {
  padding-left: 1.5em;
  list-style-type: lower-roman;
}

.list01 li + li {
  margin-top: 1em;
}

.list02 li {
  position: relative;
  padding-left: 1em;
}

.list02 li::before {
  content: "・";
  position: absolute;
  left: 0;
  top: 0;
}

.list02 li + li {
  margin-top: 0.5em;
}

.camera-message {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-danger);
}

/**********************
* 横向き不可　注意画面
***********************/
.orientation-alert {
  display: none;
}

@media screen and (orientation: landscape) {
  .orientation-alert {
    display: flex;
  }
}
/**********************
* loading
***********************/
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999; /* 1.2秒でフェードアウト */
  transition: all 1.2s ease;
  color: var(--ld-primary); /* ローディングアニメーションカラー */
  background-color: var(--ld-bg); /* 背景カラー */
}

.loading.is-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: auto;
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  width: 120px;
  height: 120px;
}

/* Loading テキスト */
.loading-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

.spinner.type1 {
  border-radius: 50%;
  border-width: 8px;
  border-style: solid;
  border-color: var(--ld-primary) rgba(228, 0, 127, 0.12) rgba(228, 0, 127, 0.12);
  /* ローディング要素のアニメーションを指定 */
  -webkit-animation: spinner1_1 1.5s infinite linear forwards;
  animation: spinner1_1 1.5s infinite linear forwards;
}

.spinner.type1 span {
  /* Loading テキストのアニメーションを指定 */
  /* animation: spinner_loading_text 1.5s infinite linear forwards reverse; */
}

/* ローディング要素のアニメーション内容 */
@-webkit-keyframes spinner1_1 {
  0% {
    transform: translate(-50%, -50%) rotate(0);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes spinner1_1 {
  0% {
    transform: translate(-50%, -50%) rotate(0);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
/* Loading テキストのアニメーション内容 */
@-webkit-keyframes spinner_loading_text {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes spinner_loading_text {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(360deg);
  }
}