* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: url("images/bachground.webp") center/cover no-repeat fixed;
  font-family: "Montserrat", sans-serif;
  color: #351627;
}

#app {
  position: relative;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  height: 100dvh;
  min-height: 736px;
  /* height: 100dvh;
  min-height: 760px; */
  overflow: hidden;
  background: url("images/bachground.webp") center/cover no-repeat;
}
#app.is-result {
  min-height: 810px;
  height: 100dvh;
}
#app.is-select {
  min-height: 750px;
  height: 100dvh;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.screen-inner {
  position: relative;
  min-height: 100dvh;
  padding: 10px 10px 142px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-left {
  position: absolute;
  top: 20px;
  left: 0;
  width: 110px;
}

.logo-right {
  position: absolute;
  top: 40px;
  right: 16px;
  width: 90px;
}

.slogan {
  margin-top: 90px;
  width: min(100%, 380px);
}

.slogan2 {
  margin-top: 40px;
}

.slogan3 {
  margin-top: 50px;
  width: min(80%, 380px);
}

.slogan4 {
  margin-top: 40px;
}

.slogan5 {
  margin-top: 50px;
}

.text-banner {
  width: min(75%, 340px);
  margin-top: -5px;
}

.form-box {
  margin-top: 10px;
  width: 75%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}

.input-wrap {
  width: 240px;
  background: url("images/input.webp") center/100% 100% no-repeat;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
}

.input-wrap input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.2px;
  text-align: center;
  color: #f1369a;
  font-family: inherit;
  text-shadow: 0 2px 1px #fff;
}

.input-wrap input::placeholder {
  color: #f700af;
  font-weight: 500;
  font-style: italic;
  opacity: 1;
  text-shadow: 0 2px 1px #fff;
}

.board-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  margin-top: -45px;
  transform: scale(0.9);
}

.board-wrap.top-space {
  margin-top: 0;
  transform: scale(1);
}

.board-wrap.board-result {
  margin-top: -50px;
  display: none;
}

#screen-6.is-active .board-wrap.board-result {
  display: block;
}

.board {
  width: 100%;
  display: block;
}

.guideline {
  width: 100%;
  margin: 0 auto;
  height: auto;
  display: block;
}

.sample,
.preview-image {
  position: absolute;
  top: 6.2%;
  left: 49.8%;
  transform: translateX(-50%);
  width: 93.6%;
  border-radius: 26px;
  object-fit: cover;
  aspect-ratio: 4 / 2.51;
}

.blur-image {
  filter: blur(6px);
  transition: filter 0.35s ease;
}

.btn-image {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  cursor: pointer;
}

.btn-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.btn-image:hover img {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.08) saturate(1.08);
}

.btn-image:active img {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.95);
}

.upload-actions .btn-image img {
  width: 200px;
  height: auto;
}

.option-item {
  transition: transform 0.18s ease, filter 0.18s ease, background-color 0.18s ease;
}

.option-item:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.option-item:active {
  transform: scale(0.98);
}

.btn-image.btn-image1 img {
  width: 100%;
  max-width: 240px;
  height: auto;
}

#btn-start {
  margin-top: 10px;
}

#btn-go-upload {
  margin-top: 0;
}

.upload-actions {
  /* margin-top: auto; */
  margin-top: -30px;
  width: 100%;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.upload-actions input {
  display: none;
}

.inline-loading {
  margin-top: -5px;
  font-size: 12px;
  color: #ed0197;
  font-weight: 700;
  text-align: center;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.7);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.inline-loading.is-active {
  opacity: 1;
}

.option-list {
  width: 290px;
  height: 210px;
  padding: 70px 10px 10px 38px;
  /* display: grid;
  grid-template-columns: 1fr;
  gap: 0; */
  background: url("images/options.webp") center/100% 100% no-repeat;
  margin-top: -32px;
  transform: scale(0.95);
}

.option-item {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #f700af;
  cursor: pointer;
  margin-bottom: 5px;
}

.option-item input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #ff3f9a;
}

.option-item.is-selected,
.option-item:has(input[type="radio"]:checked) {
  background: #ff3f9a;
  color: #fff;
  border-color: #ff3f9a;
}

.scan-wrap {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 72%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
}

.scan-wrap .preview-image {
  position: static;
  width: 100%;
  transform: none;
}

.scan-line {
  position: absolute;
  left: 50.5%;
  right: 0;
  height: 94px;
  width: 324px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    rgba(255, 120, 210, 0) 0%,
    rgba(255, 98, 198, 0.5) 26%,
    rgba(255, 68, 186, 0.82) 50%,
    rgba(255, 98, 198, 0.5) 74%,
    rgba(255, 120, 210, 0) 100%
  );
  filter: blur(10px);
  opacity: 0.9;
  /* box-shadow: 0 0 36px rgba(255, 72, 190, 0.72); */
  animation: scan 1.4s linear infinite alternate;
}

@keyframes scan {
  0% { top: 20px; }
  100% { top: calc(100% - 100px); }
}

.max-status {
  /* margin-top: auto; */
  display: none;
  margin-top: 5px;
  font-size: 12px;
  color: #ed0197;
  font-weight: 700;
  text-align: center;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.7);
}

.max-status.is-visible {
  display: block;
}

.processing-status {
  /* margin-top: auto; */
  margin-top: 5px;
  font-size: 12px;
  color: #ed0197;
  font-weight: 700;
  text-align: center;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.7);
}

.result-image {
  position: absolute;
  top: 5%;
  left: 49.4%;
  transform: translateX(-50%);
  width: 87.2%;
  border-radius: 28px;
  object-fit: cover;
  aspect-ratio: 3 / 3.54;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.result-actions {
  /* margin-top: auto; */
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  padding-bottom: 6px;
  margin-top: -45px;
  transform: scale(0.88);
}

.result-actions .btn-image img {
  width: 100%;
}

.toast {
  position: fixed;
  width: 220px;
  text-align: center;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
}

.toast.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-footer {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100vw, 480px);
  z-index: 40;
  pointer-events: none;
}

.site-footer img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer p {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  margin: 0;
  width: 95%;
  text-align: center;
  color: #d73b93;
  font-size: 3px;
  line-height: 1.4;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}
