/* page opacity */
@keyframes fade-in-opacity {
    from {
        opacity: 0;
        background-color: rgba(0, 0, 0, 1);
    }
    to {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.5);
    }
}
.fade-in-opacity {
    animation: fade-in-opacity 2s forwards;
}

.picker-popup {
    z-index: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh; /* picker-popup full screen */
    --option-height: 120px;/* first and last option */
    --toolbar-height: 0px;
    --popup-height: 100vh;
    background-color: rgba(0, 0, 0, 1); /* Initial all black */
    opacity: 1; /* initial transparency */
}
.picker-popup.invisible {
    visibility: hidden;
}
.picker-popup.visible {
    visibility: visible;
}
.picker-popup .selector {
    position: absolute;
    justify-content: center;
    align-items: center;
    height: 100%; /* selector fill the picker-popup */
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--background-2-color);
}
.picker-popup .selector .toolbar {
    position: absolute;
    height: var(--toolbar-height);
    width: 100vw;
    background-color: var(--background-color);
    box-sizing: border-box;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
}
.picker-popup .selector .toolbar .left {
    position: absolute;
    color: var(--blue);
    cursor: pointer;
}
.picker-popup .selector .toolbar .center {
    font-weight: 200;
    color: var(--color);
}
.picker-popup .selector .toolbar .right {
    position: absolute;

    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
}
.picker-popup .selector .toolbar .disabled {
    display: none;
}
.picker-popup .selector .peek-top, .picker-popup .selector .peek-bottom {
    position: absolute;
    left: 0;
    width: 100vw;
    box-sizing: border-box;
    pointer-events: none;
    background-color: var(--background-2-color);
    opacity: 0.6;
}
.picker-popup .selector .peek-top.peek-top, .picker-popup .selector .peek-bottom.peek-top {
    top: var(--toolbar-height);
    border-bottom: var(--border-color) 1px solid;
}
.picker-popup .selector .peek-top.peek-bottom, .picker-popup .selector .peek-bottom.peek-bottom {
    bottom: var(--safe-area-inset-bottom);
    border-top: var(--border-color) 1px solid;
}
.picker-popup .selector .column {
    scroll-behavior: auto;
    width: 100vw;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
    scrollbar-width: none; /* hide Firefox scroll bar */
    -ms-overflow-style: none;/* hide IE、Edge scroll bar */
    -webkit-overflow-scrolling: touch;/* close option scroll rubber */
    touch-action: pan-y;/* close option scroll rubber */
    scroll-snap-stop: always;/* close option scroll rubber */
}
.picker-popup .selector .column .before {
    flex-shrink: 0;
    content: " ";
    height: calc( var(--popup-height) / 2 - var(--option-height) / 2 - var(--toolbar-height) / 2 );
}
.picker-popup .selector .column .after {
    flex-shrink: 0;
    content: " ";
    height: calc( var(--popup-height) / 2 - var(--option-height) / 2 - var(--toolbar-height) / 2 );
}
.picker-popup .selector .column .option .pill.blue {
    background-color: var(--blue);
}
.picker-popup .selector .column .option .pill.lightblue {
    background-color: var(--lightblue);
}
.picker-popup .selector .column .option .pill.teal {
    background-color: var(--teal);
}
.picker-popup .selector .column .option .pill.green {
    background-color: var(--green);
}
.picker-popup .selector .column .option .pill.yellow {
    background-color: var(--yellow);
}
.picker-popup .selector .column .option .pill.orange {
    background-color: var(--orange);
}
.picker-popup .selector .column .option .pill.red {
    background-color: var(--red);
}
.picker-popup .selector .column .option .pill.pink {
    background-color: var(--pink);
}
.picker-popup .selector .column .option .pill.purple {
    background-color: var(--purple);
}
.picker-popup .selector .column .option .pill.grey {
    background-color: var(--grey);
}
.picker-popup.dismiss {
    pointer-events: none;
    animation: game-fade-out-opacity 3s forwards;
}
.picker-popup.dismiss .selector {

}

/* hide scroll bar */
.picker-popup .selector .column::-webkit-scrollbar {
    display: none; /* hide Chrome、Safari、Edge scroll bar */
}

.option {
    position: relative;
    flex-direction: column;
    scroll-snap-align: center;
    flex-shrink: 0;
    width: 100vw;
    align-items: center;
    opacity: 0.5;
    z-index: 1;
    display: flex;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.5s ease, height 0.5s ease;
}
.option-name {
    position: absolute;
    z-index: 2;
    left: 10%;
    top: 20%;
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    pointer-events: none;
    transition: font-size 0.5s ease;
}
.option-img {
    position: absolute;
    width: auto;
    height: 100%;
    bottom: 0;
    z-index: 1;
    object-fit: contain;
    pointer-events: none;
    overflow: visible;
}
.option-img-bg{
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.option-img-bg-desktop {
  opacity: 0;
}

/* game page */
.game-set {
    position: relative;
    top: 0;
    width: 100%;
    height: 88px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.4) 20%,rgba(0, 0, 0, 0.2) 60%,rgba(0, 0, 0, 0) 100%);
    display: flex;
    pointer-events: none;
    justify-content: space-between;
    gap: 24px;
    padding: 0 24px;
    z-index: 1;
}
.game-set-search {
    left: auto;
    flex-grow: 1;
    min-width: 80px;
    height: 48px;
    margin-top: 24px;
    border-radius: 4px;
    background: rgb(255, 255, 255, 0.1);
    backdrop-filter: blur(20px); /* blur bg */
    -webkit-backdrop-filter: blur(20px);
    padding: 0 12px;
    font-size: 18px;
    color: rgba(255, 255, 255, 1);
    border: 0;
    outline: none;
    pointer-events: auto;
    -webkit-appearance: none;/* IOS box-shadow */
}
.game-set-search:focus {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.game-set-search::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.game-set-button {
    width: 48px;
    height: 48px;
    margin-top: 24px;
    border-radius: 4px; /* rounded */
    background: rgba(255, 255, 255, 0); /* bg */
    border: 0 ; /* line */
    backdrop-filter: blur(12px); /* blur bg */
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.game-set-button:active {
    background: rgba(255, 255, 255, 0.15); /* bg */
}
.game-set-button-desktop {
    display: none;
    opacity: 0;
}
.game-preface-overlay {
    position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 1s ease;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.game-preface-overlay .game-preface {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 2;
}
.game-preface-overlay.active {
    background-color: rgba(0, 0, 0, 1);
    pointer-events: auto;
}
.game-preface-p {
    position: fixed;
    top: 30vh;
    left: 8vw;
    right: 8vw;
    color: rgba(255, 255, 255, 0.8);
    z-index: 2;
    text-align: left;
    font-size: 1.4rem;
    line-height: 1.8;
    word-break: normal;
    white-space: pre-wrap;
    pointer-events: none;
    transform: translateY(-50%);
}
.game-preface-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease;
}
.game-preface-bg.fade-in {
  opacity: 1;
}
.game-preface-cursor {
  display: inline-block;
  width: 1ch;
  animation: blink 2s steps(2, start) infinite;
  color: rgba(255, 255, 255, 0.5);
  font-weight: normal;
}
.game-preface-button {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 40px;
    font-size: 1.6em;
    font-weight: bold;
    align-items: center;
    cursor: pointer;
    padding: 14px 20px;
    border-radius: 4px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border: 0 solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: backdrop-filter 2s, -webkit-backdrop-filter 2s, opacity 2s;
    opacity: 0;
    pointer-events: none;
}
.game-preface-button.show {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(10px); /* android blur bg */
    -webkit-backdrop-filter: blur(10px);/* iphone blur bg */
}
.game-preface-button.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.9);
}
.game-preface-button p {
    color: rgba(255, 255, 255, 0.8);
    fill-opacity: 1;
    z-index: 3;
    pointer-events: auto;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}
.game-confirm-button{
    position: relative;
    font-size: 1.6em;
    font-weight: bold;
    bottom: 0;
    cursor: pointer;
    padding: 14px 12px;
    border-radius: 4px; /* rounded */
    z-index: 2;
    background: rgba(255, 255, 255, 0.1); /* bg */
    border: 0 solid rgba(255, 255, 255, 0.2); /* line */
    backdrop-filter: blur(10px); /* android blur bg */
    -webkit-backdrop-filter: blur(10px);/* iphone blur bg */
}
.game-confirm-button p {
    color: rgba(255, 255, 255, 0.8);
    fill-opacity: 1;
    z-index: 3;
    pointer-events: auto;
}
.game-confirm-button:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.2);
}
.game-confirm-button-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 20vh;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 60%,rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

/* game page set popup */
.setting-overlay.fade-in {
    opacity: 1;
    transform: scale(1);
}
.setting-overlay.fade-out {
    opacity: 0;
    transform: scale(0.6);
}
.setting-overlay {
    background-color: rgba(0, 0, 0, 0);
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 2;
    align-items: center;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.6);
    transform-origin: calc(100% - 24px) 88px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.setting-popup {
    right: 24px;
    position: absolute;
    background-color: rgba(35, 35, 35, 1);
    -webkit-backdrop-filter: blur(64px);
    border-radius: 6px;
    padding: 8px 0;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 220px;
    pointer-events: none;
}
.setting-option {
    background-color: rgba(255, 255, 255, 0);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    height: 56px;
    display: flex;
    justify-content: left;
    padding-left: 12px;
    align-items: center;
    cursor: pointer;
    margin-left: 8px;
    margin-right: 8px;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: auto;
    z-index: 2;
}
.setting-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.setting-option:active {
    background-color: rgba(255, 255, 255, 0.15);
}
.setting-rotate-set-svg-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
}
.setting-rotate-svg {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) ;
}

/*option story page */
.option-story {
    position: absolute;
    height: 100vh;
    width: 100vw;
    opacity: 0;
    pointer-events: none;
    transition: opacity 2s ease;
}
.option-story.active {
    opacity: 1;
    pointer-events: auto;
}
.option-story.fading {
    opacity: 0;
    pointer-events: none;
}
.option-story.inactive {
    opacity: 0;
    pointer-events: none;
}
.option-story p {
    position: fixed;
    top: 30vh;
    left: 8vw;
    right: 8vw;
    color: rgba(255, 255, 255, 0.8);
    z-index: 2;
    text-align: left;
    font-size: 1.4rem;
    line-height: 1.8;
    word-break: normal;
    white-space: pre-wrap;
    pointer-events: none;
    transform: translateY(-50%);
}
.option-story-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    z-index: 0;
}
.option-story-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    opacity: 1;
    z-index: 0;
}
.option-story-button-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
    pointer-events: none;
}
.option-story-button {
    position: relative;
    font-size: 1.6em;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    bottom: 0;
    cursor: pointer;
    outline: none;
    z-index: 0;
    padding: 14px 40px;
    border-radius: 4px; /* rounded */
    background: rgba(255, 255, 255, 0.15); /* bg */
    border: 0; /* line */
    opacity: 0;
    backdrop-filter: blur(0px); /* blur bg */
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 3s,-webkit-backdrop-filter 3s,opacity 3s;
    pointer-events: auto;
}
.option-story-button.show {
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.option-story-button-bg {
    position: absolute;
    height: 100%;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 30%,rgba(0, 0, 0, 0.1) 70%,rgba(0, 0, 0, 0) 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 3s ;
    pointer-events: none;
}
.option-story-button-bg.show {
    opacity: 1;
}
.option-story-button:hover {
    background: rgba(255, 255, 255, 0.3);
}
.option-story-button:active {
    background: rgba(255, 255, 255, 0.4);
}
.option-story-button span {
    filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.2)); /* projection */
    fill-opacity: 1;
    pointer-events: auto;
}
.option-story-blinking-cursor {
    display: inline-block;
    width: 1ch;
    animation: blink 2s steps(2, start) infinite;
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
}
@keyframes blink {
    to {
        visibility: hidden;
    }
}

/* Make character page */
.setting-nav {
    display: flex;
    align-items: center;
    padding: 0 8px;
    position: absolute;
    width: 100%;
    height: 56px;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3;
    backdrop-filter: blur(18px); /* android blur bg */
    -webkit-backdrop-filter: blur(10px);/* iphone blur bg */
    will-change: backdrop-filter;
    transform: translateZ(0);
}
.setting-nav-return {
    position: relative;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0);
    border-radius: 4px; /* 圆角 4px */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
}
.setting-nav-return::before {
    content: "";
    width: 22px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='18' fill='none'%3E%3Cpath fill='%23fff' fill-opacity='.8' d='M11 2 5.5 7.5H22v3H5.5L11 16l-2 2-9-9 9-9 2 2Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.setting-nav-return-placeholder {
    width: 48px;
    height: 48px;
    border: 0;
}
.setting-nav-title {
    flex-grow: 1;
    color: rgb(255, 255, 255, 0.8);
    font-size: large;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.setting-input-list {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    pointer-events: auto;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 400px;
}
.setting-input-list::-webkit-scrollbar {
    display: none; /* ios WebKit hide scroll */
}
.setting-input-list-center {
    width: 100vw;
    height: 100vh;
    position: fixed;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 280px;
}
.setting-input-list-center::-webkit-scrollbar {
    display: none; /* ios WebKit hide scroll */
}
.setting-divider {
    display: flex;
    position: relative;
    top: 64px;
    margin-bottom: 24px;
}
.setting-divider .line {
    margin: 12px;
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}
.setting-divider .or-text {
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    white-space: nowrap;
}
.setting-divider-box {
    width: 100%;
    font-size: 18px;
    height: 56px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    border: 0;
    outline: none;
    padding: 0 16px;
    display: flex;
    align-Items: center;
    justify-Content: center;
}
.setting-input {
    display: flex;
    position: relative;
    top: 72px;
    margin-bottom: 24px;
    padding: 0 24px;
}
.setting-input-box {
    width: 100%;
    font-size: 20px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    outline: none;
    padding: 0 16px;
    border: 0;
    -webkit-appearance: none;
}
.setting-input-box:focus {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.setting-input-box::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.setting-input-box-high {
    width: 100%;
    font-size: 20px;
    height: 56px;
    transition: height 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    border: 0;
    outline: none;
    padding: 14px 16px;
    resize: none;
    vertical-align: middle;
    overflow: auto;
    scrollbar-width: none;    /*Firefox */
    -ms-overflow-style: none;   /*IE 10+ */
    -webkit-appearance: none;
}
.setting-input-box-high:focus {
    height: 160px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.setting-input-box-high::placeholder {
    color: rgba(255, 255, 255, 0.4);
    }
.setting-input-box-high::-webkit-scrollbar {
  display: none; /* Chrome / Safari / Edge */
}
.setting-input-box-svg {
    width: 100%;
    font-size: 18px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    border: 0;
    outline: none;
    padding: 0 16px;
    display: flex;
    align-Items: center;
    justify-Content: center;
    gap: 12px;
}
.setting-input-box-svg:hover {
    background: rgba(255, 255, 255, 0.2); /* bg */
}
.setting-input-upload {
    position: relative;
    width: 100%;
    font-size: 20px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: underline;
    padding-top: 8px;
    padding-bottom: 24px;
    pointer-events: none;
}
.setting-input-upload-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.setting-input-upload-p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 0.5px;
    align-items: center;
    cursor:pointer;
    pointer-events: auto;
}
.setting-input-upload-svg {
    position: absolute;
    left: -28px;
    transform: translateY(2px);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.setting-input-upload-svg.loading,
.setting-input-upload-svg.success {
  display: block;
}
.setting-input-upload-svg.loading {
  animation: rotate 1s linear infinite;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'><path fill='rgb(255,255,255,0.8)' d='M0 9c0-5 4-9 9-9a1 1 0 1 1 0 2 7 7 0 1 0 7 7 1 1 0 1 1 2 0A9 9 0 1 1 0 9Z'/></svg>");
}
.setting-input-upload-svg.success {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='15' fill='none'><path fill='rgba(255, 255, 255, 0.8)' d='M19.7 1.7 7 14.4.3 7.7l1.4-1.4L7 11.6 18.3.3l1.4 1.4Z'/></svg>");
}
@keyframes rotate {
  from { transform: translateY(2px) rotate(0deg); }
  to { transform: translateY(2px) rotate(360deg); }
}
.setting-input-p {
    position: relative;
    margin-top: 80px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    fill-opacity: 1;
    pointer-events: auto;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 0.5px;
    cursor:pointer;
}
.setting-input-p-red {
    position: relative;
    margin-top: 120px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 68, 62, 0.8);
    fill-opacity: 1;
    pointer-events: auto;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 0.5px;
    cursor:pointer;
}
.setting-input-p-red-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
.setting-input-p-popup {
    margin-top: 24px;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.25);
    fill-opacity: 1;
    pointer-events: auto;
}
.setting-story-branches {
    display: flex;
    flex-direction: column;
    animation: fadeInBranch 0.6s ease-out;
}
.setting-story-node-wrapper {
    animation: fadeInNode 0.6s ease-out;
}
.setting-story-branches.fade-out {
    animation: fadeOutBranch 0.6s ease-in forwards;
}
@keyframes fadeInBranch {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeOutBranch {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-16px);
    }
}
.setting-confirm-button:enabled {
    color: rgba(0, 0, 0, 0.8 );
    position: relative;
    font-size: 1.6em;
    font-weight: bold;
    bottom: 0;
    cursor: pointer;
    padding: 14px 24px;
    border-radius: 4px; /* rounded */
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9); /* bg */
    border: 0 solid rgba(255, 255, 255, 0.2); /* line */
    backdrop-filter: blur(20px); /* android blur bg */
    -webkit-backdrop-filter: blur(10px);/* iphone blur bg */
}
.setting-confirm-button:disabled {
    position: relative;
    font-size: 1.6em;
    font-weight: bold;
    bottom: 0;
    cursor: pointer;
    padding: 14px 24px;
    border-radius: 4px; /* rounded */
    pointer-events: auto;
    border: 0 solid rgba(255, 255, 255, 0.2); /* line */
    backdrop-filter: blur(20px); /* android blur bg */
    -webkit-backdrop-filter: blur(10px);/* iphone blur bg */
    background: rgba(255, 255, 255, 0.4); /* bg */
}
.setting-confirm-button p {
    color: rgba(0, 0, 0, 0.8);
    fill-opacity: 1;
    pointer-events: auto;
}
.setting-confirm-button:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.7);
}
.setting-confirm-button-loading-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 2px));
    pointer-events: none;
}
.setting-confirm-button-loading {
    width: 1em;         /* 保持与文字宽度相似 */
    height: 1em;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
.setting-confirm-button-loading-svg {
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M0 16C0 7 7 0 16 0a2 2 0 1 1 0 4 12 12 0 1 0 12 12 2 2 0 1 1 4 0 16 16 0 1 1-32 0Z'/%3E%3C/svg%3E");
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.setting-confirm-button-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}
.setting-uploaded-option-list {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    pointer-events: auto;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding:0 16px 400px 16px;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.setting-uploaded-option-list::-webkit-scrollbar {
    display: none; /* ios WebKit hide scroll */
}
.setting-uploaded-option {
    position: relative;
    margin-bottom: 16px;
    padding: 24px 24px;
    width: 100%;
    min-height: 160px;
    max-width: 400px;
    background: rgba(255,255,255,0.1);
    display: flex;
    top: 64px;
    border-radius: 6px;
    overflow: hidden;
    cursor:pointer;
}
.setting-uploaded-option-word {
    position: absolute;
    top: 32px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2;
}
.setting-uploaded-option-tittle {
    color: rgb(255, 255, 255, 0.8);
    font-size: 24px;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
}
.setting-uploaded-option-subtitle {
    color: rgb(255, 255, 255, 0.4);
    font-size: 18px;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
}
.setting-uploaded-option-img {
    /*background-image: url('../public/game_image_Stalin.png');*/
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    object-fit: cover;
}
.setting-uploaded-option-img-bg {
    /*background-image: url('../public/game_image_Stalinbg.png');*/
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    object-fit: cover;
}

/* Make character page popup */
.setting-input-popup-overlay {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4;
}
.setting-input-popup {
    background: rgba(41, 41, 41, 0.9);
    border-radius: 8px;
    padding: 24px 16px 24px 16px;
    width: calc(100vw - 48px);
    max-width: 480px;
    color: white;
    text-align: center;
}
.setting-input-popup-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    margin-bottom: 32px;
}
.setting-input-popup-image {
    width: 100%;
    margin-bottom: 4px;
    min-height: 120px;
    max-height: 260px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill='%23fff' fill-opacity='0.2' d='M16 16H8V8h8v8ZM8 8H0V0h8v8Z'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 16px 16px;
    background-position: center;
}
.setting-input-popup-text {
    margin-bottom: 32px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
}
.setting-input-popup-text-hidden {
    margin-bottom: 32px;
}


/* desktop */
@media (min-aspect-ratio: 768.01 / 1024) {
    .picker-popup .selector .column .before {
        flex-shrink: 0;
        content: " ";
        height: calc( var(--popup-height) / 2 - var(--option-height) / 2 - var(--toolbar-height) / 2 );
    }
    .picker-popup .selector .column .after {
        flex-shrink: 0;
        content: " ";
        height: calc( var(--popup-height) / 2 - var(--option-height) / 2 - var(--toolbar-height) / 2 );
    }
    .picker-popup.dismiss .selector {

    }
    .picker-popup {
        z-index: 0;
        position: fixed;
        top: 0;
        left: 9%;
        right: 0;
        height: 100vh; /* picker-popup full screen */
        --option-height: 20px;
        --toolbar-height: 0px;
        --popup-height: 100vh;
        opacity: 1; /* initial transparency */
        background-color: rgba(0, 0, 0, 0); /* Initial all black */
    }
    .picker-popup .selector {
        position: absolute;
        justify-content: center;
        align-items: center;
        height: 100%; /* selector fill the picker-popup */
        display: flex;
        flex-direction: column;
    }
    .picker-popup .selector .toolbar {
        position: absolute;
        height: var(--toolbar-height);
        width: 100%;
        top: 0;
        left: 0;
        box-sizing: border-box;
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .picker-popup .selector .column {
        width: 100%;
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        align-items: flex-start;
        gap: 12px;
    }

    .option {
        width:240px;
        position: relative;
        flex-shrink: 0;
        transition: opacity 0.5s ease, width 0.5s ease, height 0.5s ease;
        align-items: flex-start;
        justify-content: flex-start;
        display: flex;
        pointer-events: none;
        overflow: visible;
    }
    .option-img {
        position: absolute;
        bottom: 0;
        left: -18px;
        height: 120%;
        transform: rotateY(180deg);
    }
    .option-img-bg-desktop {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.15);
        z-index: 0;
        border-radius: 8px;
        opacity: 1;
    }
    .option-img-bg{
        opacity: 0;
    }
    .option-name {
        position: absolute;
        left: auto;
        top: 16%;
        right: 20px;
        z-index: 2;
        color: rgba(255, 255, 255, 0.8);
        font-weight: normal;
        pointer-events: none;
    }

    .game-body-p{
        position: fixed;
        top: 0;
        left: calc(8% + 300px);
        right: 10%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        z-index: 1;
        color: rgba(255, 255, 255, 0.8);
        font-size: 18px;
        line-height: 2;
        pointer-events: none;
    }
    .game-body-p p {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        overflow-y: auto;
        padding-right: 6px;
    }
    .game-img-bg-desktop {
        position: absolute;
        width: 100%;
        height: 100%;
        overflow: hidden;
        transform: rotateY(180deg);
    }
    .game-img-bg-desktop img {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(3px);
        z-index: -1;
    }
    .game-img-bg-desktop::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 0;
        pointer-events: none;
    }

    .game-set {
        position: relative;
        opacity: 1;
        height: 88px;
        background: rgba(0, 0, 0, 0) ;
        top: 8px;
    }
    .game-set-search {
        margin-left: calc(8% + 276px);
        min-width: 80px;
        max-width: 320px;
    }
    .game-set-search:hover {
        background: rgb(255, 255, 255, 0.15);
    }
    .game-set-button {
        opacity: 0;
        pointer-events: none;
    }
    .game-set-button-desktop {
        margin-right: calc(10% - 20px);
        width: 192px;
        height: 48px;
        margin-top: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 1;
        pointer-events: auto;
    }
    .game-set-button-desktop-svg {
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 4px; /* rounded */
        border: 0 ; /* line */
        outline: none;
        width: 48px;
        height: 48px;
        top: 50%;
        left: 50%;
        opacity: 0.8;
        backdrop-filter: blur(12px); /* blur bg */
        -webkit-backdrop-filter: blur(12px);
    }
    .game-set-button-desktop-svg:hover {
        background: rgba(255, 255, 255, 0.2); /* bg */
        opacity: 0.85;
    }
    .game-set-button-desktop-svg::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc( 0px - 100%);
        left: 50%;
        transform: translateX(-50%);
        background: rgb(0, 0, 0, 0.7);
        color: rgb(255,255,255,0.9) ;
        font-size: 14px;
        padding: 12px 12px;
        border-radius: 4px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
}
    .game-set-button-desktop-svg:hover::after {
        opacity: 1;
    }
    .game-set-button-desktop-svg p {
        font-size: 18px;
        font-weight: bold;
        color: rgb(255,255,255,1);
    }

    /*background-image change*/
    @keyframes fadeInOut {
        0% {
            opacity: 0.4;
        }
        100% {
            opacity: 1;
        }
    }

    .game-img-bg-desktop img.fade-image {
        animation: fadeInOut 2.5s ease forwards;
    }

    /*game-body-p p change*/
    @keyframes fadeText {
        from {
            opacity: 0.1;
        }
        to {
            opacity: 1;
        }
    }
    .fade-text {
        animation: fadeText 2s ease-out forwards;
        opacity: 0;
    }

    .game-confirm-button{
        position: fixed;
        font-weight: bold;
        right: 10%;
        font-size: 1.6em;
        bottom: 8%;
        padding: 14px 12px;
        border-radius: 4px; /* rounded */
        z-index: 1;
        background: rgba(255, 255, 255, 0.15); /* bg */
        backdrop-filter: blur(10px); /* blur bg */
        -webkit-backdrop-filter: blur(4px);
        pointer-events: auto;
    }
    .game-confirm-button p {
        fill-opacity: 1;
        z-index: 3;
        pointer-events: auto;
    }
    .game-confirm-button:hover {
        background: rgba(255, 255, 255, 0.2);
        box-shadow: 0 6px 40px rgba(0, 0, 0, 0.3);
    }
    .game-confirm-button-footer {
        background: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 70%,rgba(0, 0, 0, 0) 100%);
        pointer-events: none;
    }

    /* set popup */
    .setting-overlay {
        transform-origin: 90% 0;
    }
    .setting-popup {
        right: 10%;
        width: 200px;
    }
    .setting-option {
        height: 44px;
        font-size: 16px;
    }

    /* Make character page  */
    .setting-input-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100vw;
    }
    .setting-input-list-center {
        display: flex;
    }
    .setting-input {
        width: 400px;
    }
    .setting-divider {
        width: 400px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
}

html, body, #app {
    height: 100vh; /* safari window.innerHeight */
    overflow: hidden;/* Disable scrolling */
    width: 100vw;
    margin: 0;
    padding: 0;
    position: fixed; /* Fixed the page prevent iOS browser from sliding */
    background:rgba(0, 0, 0, 1);
    -webkit-user-select: none;  /* Disable text choice */
    user-select: none;
    overscroll-behavior: none;
    touch-action: none;
    /*touch-action: manipulation;*/
    scrollbar-width: none;
}

/*button no light*/
button, a, input[type="button"], input[type="submit"] {
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
    outline: none;
    box-shadow: none;
    background: none;
}
button:focus, button:active, a:focus, a:active,
input[type="button"]:focus, input[type="button"]:active,
input[type="submit"]:focus, input[type="submit"]:active {
    outline: none;
    box-shadow: none;
}

/*disable image drag */
img {
    pointer-events: none;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    will-change: opacity;
}
.overlay.active {
    animation: fade-in 1s ease-out forwards;
    pointer-events: auto;
}
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* loading page */
.home-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transform: translateY(-10%);
}
.home-loading-img {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    background-image: url("data:image/svg+xml,%3Csvg height='4' width='6' fill='none' viewBox='0 0 6 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.49995 0H0.999976L2.39995 0.8L2.49995 0ZM1.99995 4L2.09995 3.2H0.599976L1.99995 4ZM2.29995 1.6L2.19995 2.4L0.799976 1.6H2.29995ZM3.99998 4L4.12498 3H4.49998C5.3284 3 5.99998 2.32843 5.99998 1.5C5.99998 0.671573 5.3284 0 4.49998 0H3.99998H3.49998L2.99998 4H3.99998ZM4.49998 2H4.24998L4.37498 1H4.49998C4.77612 1 4.99998 1.22386 4.99998 1.5C4.99998 1.77614 4.77612 2 4.49998 2Z' fill='%23F9D8B6' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}
.home-loading-progress-bar {
    width: 88px;
    height: 2px;
    border-radius: 4px;
    background: rgba(249, 216, 182, 0.2);
    overflow: hidden;
}
.home-loading-progress-fill {
    height: 100%;
    background: rgba(249, 216, 182,  1);
    transition: width 0.3s ease;
}
