/* ===================================
   BB 四週年網頁遊戲 - 主樣式
   =================================== */

/* ===================================
   CSS Variables
   =================================== */
:root {
  --primary-01: #B8AD95;
  --primary-02: #494542;
  --primary-03: #84573E;
  --primary-04: #F7EDCA;
  
  --bg-overlay: rgba(0, 0, 0, 0.6);
  --white-flash: rgba(255, 255, 255, 1);
  --text-shadow: rgba(0, 0, 0, 0.5);
  
  --vh: 1vh;
  
  --transition-fast: 200ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: -webkit-fill-available;
  font-size: 16px;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: calc(var(--vh, 1vh) * 100);
  font-family: 'Noto Sans TC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
  background-color: #1a1a1a;
  color: var(--primary-03);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

img {
  -webkit-user-drag: none;
  pointer-events: none;
}

.no-select {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.hidden {
  display: none !important;
}

/* ===================================
   App Container
   =================================== */
#app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background-color: #1a1a1a;
}

/* ===================================
   Screen Base
   =================================== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===================================
   Loading Screen
   =================================== */
#loading-screen {
  background-image: url('../assets/images/pc/bg/bg_01.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1000;
  pointer-events: none;
}

#loading-screen.hidden {
  display: none !important;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
  pointer-events: auto;
}

.loading-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  pointer-events: auto;
}

.loading-content.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-image {
  max-width: 80%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: auto;
}

.loading-text {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-02);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  gap: 2px;
}

.loading-progress {
  position: absolute;
  top: 73%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-02);
  font-size: clamp(12px, 1.5vw, 20px);
  font-weight: 500;
  opacity: 0.8;
}

.loading-letter {
  display: inline-block;
  -webkit-animation: bounce 1.5s ease-in-out infinite;
  animation: bounce 1.5s ease-in-out infinite;
}

@-webkit-keyframes bounce {
  0%, 60%, 100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  30% {
    -webkit-transform: translateY(-10px);
    transform: translateY(-10px);
  }
}

@keyframes bounce {
  0%, 60%, 100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  30% {
    -webkit-transform: translateY(-10px);
    transform: translateY(-10px);
  }
}

@-webkit-keyframes spin {
  to { 
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg); 
  }
}

@keyframes spin {
  to { 
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg); 
  }
}

/* ===================================
   Entry Screen
   =================================== */
#entry-screen {
  background-image: url('../assets/images/pc/bg/bg_01.jpg');
  background-size: cover;
  background-position: center;
}

.entry-bg {
  display: none;
}

.entry-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  max-width: 600px;
  max-height: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  gap: 20px;
}

.entry-logo {
  max-width: 400px;
  width: 90%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.entry-logo.fade-in {
  opacity: 1;
}

.entry-title {
  display: none;
}

.entry-description {
  position: relative;
  color: var(--primary-03);
  text-align: center;
  max-width: 622px;
  paint-order: stroke fill;
  -webkit-text-stroke: 2.5px rgba(255, 255, 255, 0.95);
  text-shadow: 
    0 0 4px rgba(255, 255, 255, 0.8),
    0 0 8px rgba(255, 255, 255, 0.4);
  opacity: 0;
  transition: opacity 0.8s ease-out;
  white-space: pre-line;
}

.entry-description.fade-in {
  opacity: 1;
}

.btn-start {
  width: 288px;
  height: 129px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), opacity 0.8s ease-out;
  font-size: 29.47px;
  color: var(--primary-04);
  font-weight: 700;
  letter-spacing: 2px;
  position: relative;
  background-image: none;
  opacity: 0;
  pointer-events: none;
}

.btn-start.fade-in {
  opacity: 1;
}

.btn-start::before,
.btn-start::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
  z-index: -1;
}

.btn-start::before {
  background-image: url('../assets/images/pc/ui/login_btn_nor_s.png');
  opacity: 1;
}

.btn-start::after {
  background-image: url('../assets/images/pc/ui/login_btn_hov_s.png');
  opacity: 0;
}

.btn-start:hover::before,
.btn-start:active::before {
  opacity: 0;
}

.btn-start:hover::after,
.btn-start:active::after {
  opacity: 1;
}

.btn-start:hover,
.btn-start:active {
  transform: scale(1.02);
}

/* entry-screen menu button removed, using global-top-buttons instead */

/* ===================================
   Copyright
   =================================== */
.copyright {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #B8AD95;
  font-size: 17px;
  letter-spacing: -0.408px;
  line-height: 22px;
  z-index: 150;
  pointer-events: none;
}

/* Copyright 底下的黑色漸層（通用） */
.copyright-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 140;
  pointer-events: none;
}

.game-copyright {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  z-index: 5;
  pointer-events: none;
}

.bgm-copyright {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #B8AD95;
  font-size: 17px;
  letter-spacing: -0.408px;
  line-height: 22px;
  z-index: 150;
  pointer-events: none;
}

/* Copyright 底下的黑色漸層 */
.bgm-copyright-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 140;
  pointer-events: none;
}

/* ===================================
   Global Top Buttons (BGM + Language Menu)
   =================================== */
.global-top-buttons {
  position: fixed;
  top: 30px;
  right: 102px;
  z-index: 300;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  transition: opacity var(--transition-normal) ease-out;
}

.global-top-buttons.hidden {
  display: none;
}

/* ===================================
   Global UID Display (Bottom Left)
   =================================== */
.global-uid-display {
  position: fixed;
  bottom: 2px;
  left: 2px;
  z-index: 300;
  padding: 10px 20px;
  color: var(--primary-01);
  opacity: 0.5;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: opacity var(--transition-normal) ease-out;
}

.global-uid-display.hidden {
  display: none;
}

.bgm-toggle-btn {
  width: 60px;
  height: 60px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), filter var(--transition-normal);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.bgm-toggle-btn:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.bgm-toggle-btn img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.bgm-toggle-btn img.fade-out {
  opacity: 0;
  z-index: 0;
}

.bgm-toggle-btn img.fade-in {
  opacity: 1;
  z-index: 1;
}

/* ===================================
   Menu Button
   =================================== */
.menu-button {
  position: relative;
  top: auto;
  right: auto;
  width: 60px;
  height: 60px;
  background-color: var(--primary-01);
  border: 5px solid var(--primary-02);
  border-radius: 50%;
  cursor: pointer;
  z-index: 302;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--transition-fast),
              border var(--transition-normal) ease-out,
              background-color var(--transition-normal) ease-out,
              box-shadow var(--transition-normal) ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

/* Global menu button positioning */
.global-menu-btn {
  position: fixed;
  top: 30px;
  right: 30px;
}

.menu-button.active {
  z-index: 302;
  border: none;
  box-shadow: none; 
  background-color: transparent;
}

.menu-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.menu-button.active:hover {
  box-shadow: none; 
}

.menu-icon {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--primary-02);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  flex-shrink: 0;
}

.menu-button.active .menu-icon:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-button.active .menu-icon:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-button.active .menu-icon:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


/* ===================================
   Language Menu
   =================================== */
.language-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 301;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.language-menu.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.language-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(184, 173, 149, 0.85);
  backdrop-filter: blur(4px);
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.language-menu.hidden .language-menu-overlay {
  opacity: 0;
}

.language-menu-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0;
  background: none;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.language-menu.hidden .language-menu-content {
  opacity: 0;
  transform: scale(0.95);
}

.menu-title {
  display: none;
}

.language-menu-toggle {
  display: none;
}

.language-buttons {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 35px;
  align-items: center;
  z-index: 1;
}

.btn-lang {
  background: none;
  background-color: transparent;
  color: var(--primary-02);
  border: none;
  font-size: 32px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 700;
  letter-spacing: 2px;
  padding: 0;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-lang:hover {
  color: var(--primary-03);
  transform: scale(1.1);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-lang.active {
  color: var(--primary-03);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 桌面版：右上角語言選單 */
@media (min-width: 768px) {
  .language-menu {
    width: auto;
    height: auto;
    top: 30px;
    right: 30px;
    left: auto;
    justify-content: flex-start;
    gap: 0;
    z-index: 301;
  }
  
  .language-menu-overlay {
    display: none;
  }
  
  .language-menu-toggle {
    display: none;
  }
  
  .language-menu-content {
    position: relative;
    top: 0;
    right: 0;
    background-color: rgba(184, 173, 149, 0.6);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 12px;
    padding: 80px 60px 60px 60px;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  .language-buttons {
    gap: 30px;
  }
  
  .btn-lang {
    font-size: 24px;
    color: #494542;
    font-weight: 700;
  }
  
  .btn-lang:hover {
    color: #84573E;
    transform: scale(1.15);
  }
  
  .btn-lang.active {
    color: #84573E;
  }
}

/* ===================================
   Dialog (BGM Popup)
   =================================== */
.dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bgm-dialog {
  background-image: url('../assets/images/pc/bg/bg_01.jpg');
  background-size: cover;
  background-position: center;
}

.bgm-dialog-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* BGM 黑色模糊遮罩 */
.bgm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
  transition: opacity 0.5s ease-out;
}

.bgm-overlay.fade-out {
  opacity: 0;
}

.dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-overlay);
}

.dialog-content {
  position: relative;
  width: min(clamp(300px, 40vw, 434px), calc(90vh * 434 / 366));
  padding: 8% 2%;
  aspect-ratio: 434 / 366;
  text-align: center;
  background-image: url('../assets/images/pc/ui/dialog_bg.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bgm-dialog-content {
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bgm-dialog-content.fade-out {
  opacity: 0;
}

.bgm-dialog-text {
  color: var(--primary-03);
  margin-bottom: 35px;
  font-weight: 500;
  line-height: 40px;
}

.dialog-bg {
  display: none;
}

.dialog-text {
  font-size: 18px;
  color: var(--primary-03);
  margin-bottom: 30px;
  font-weight: 500;
}

.dialog-buttons {
  display: flex;
  gap: 20%;
  justify-content: center;
  z-index: 100;
  position: relative;
}

.btn-dialog {
  width: min(clamp(45px, 10vw, 98px), calc(15vh * 98 / 45));
  aspect-ratio: 98 / 45;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  position: relative;
  z-index: 10;
}

.btn-on {
  position: relative;
  background-image: none;
}

.btn-on::before,
.btn-on::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
}

.btn-on::before {
  background-image: url('../assets/images/pc/ui/dialog_btn_on_nor.png');
  opacity: 1;
}

.btn-on::after {
  background-image: url('../assets/images/pc/ui/dialog_btn_on_hov.png');
  opacity: 0;
}

.btn-on:hover::before,
.btn-on:active::before {
  opacity: 0;
}

.btn-on:hover::after,
.btn-on:active::after {
  opacity: 1;
}

.btn-on:hover,
.btn-on:active {
  transform: scale(1.05);
}

.btn-off {
  position: relative;
  background-image: none;
}

.btn-off::before,
.btn-off::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
}

.btn-off::before {
  background-image: url('../assets/images/pc/ui/dialog_btn_off_nor.png');
  opacity: 1;
}

.btn-off::after {
  background-image: url('../assets/images/pc/ui/dialog_btn_off_hov.png');
  opacity: 0;
}

.btn-off:hover::before,
.btn-off:active::before {
  opacity: 0;
}

.btn-off:hover::after,
.btn-off:active::after {
  opacity: 1;
}

.btn-off:hover,
.btn-off:active {
  transform: scale(1.05);
}

/* ===================================
   Login Screen (UID Input)
   =================================== */
#login-screen {
  background-image: url('../assets/images/pc/bg/bg_02.jpg');
  background-size: cover;
  background-position: center;
}

.login-bg {
  display: none;
}

.login-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box-wrapper {
  position: relative;
  display: grid;
  grid-template-rows: 14% minmax(0, 1fr) 20% auto;
  align-items: center;
  margin-top: -5vh;
}

.login-box-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/pc/ui/login_bg_s.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
}

.login-title-container {
  grid-row: 2;
  margin: 0 8%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.login-box-inner {
  padding: 0 8%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-height: 0;
}

.login-box-inner::-webkit-scrollbar {
  display: none;
}

.login-title {
  color: var(--primary-03);
  margin-bottom: 15px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1;
  flex-shrink: 0;
  padding: 0 10%;
}

.uid-input-container {
  margin-bottom: 15px;
  width: 100%;
  flex-shrink: 0;
}

.uid-input-wrapper {
  position: relative;
  width: 84%;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.uid-input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  font-size: 16px;
  border: 2px solid #827167;
  border-radius: 18px;
  background-color: #DDCEC0;
  color: var(--primary-02);
  outline: none;
  transition: border-color var(--transition-fast);
  text-align: left;
}

.uid-loading {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.7;
}

.uid-input:focus {
  border-color: #827167;
}

.uid-input::placeholder {
  color: #827167;
  letter-spacing: 2px;
  font-size: 16px;
}

.uid-error {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 8px;
}

.uid-hint {
  font-size: 13px;
  color: var(--primary-03);
  line-height: 19px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 500;
  flex-shrink: 0;
}

.privacy-notice {
  text-align: center;
  margin-bottom: 15px;
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  max-height: none;
  overflow: visible;
  border-top: 1px solid var(--primary-01);
  padding-top: 12px;
  width: 100%;
  flex-shrink: 0;
}

.privacy-notice h3 {
  font-size: 13px;
  color: var(--primary-03);
  margin-bottom: 8px;
  font-weight: 900;
  text-align: center;
  line-height: 19px;
}

.privacy-notice p {
  font-size: 13px;
  color: var(--primary-03);
  line-height: 19px;
  white-space: normal;
  text-align: center;
  font-weight: 500;
}

.btn-gemstone-text {
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
  font-size: 29.47px;
  color: var(--primary-04);
  font-weight: 700;
  letter-spacing: 2px;
  flex-shrink: 0;
  grid-row: 3;
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 1;
  background-image: none;
}

.btn-gemstone-text::before,
.btn-gemstone-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
  z-index: -1;
}

.btn-gemstone-text::before {
  background-image: url('../assets/images/pc/ui/login_btn_nor_s.png');
  opacity: 1;
}

.btn-gemstone-text::after {
  background-image: url('../assets/images/pc/ui/login_btn_hov_s.png');
  opacity: 0;
}

.btn-gemstone-text:hover::before,
.btn-gemstone-text:active::before {
  opacity: 0;
}

.btn-gemstone-text:hover::after,
.btn-gemstone-text:active::after {
  opacity: 1;
}

.btn-gemstone-text:hover,
.btn-gemstone-text:active {
  transform: scale(1.02);
}

.gemstone-image-wrapper {
  grid-row: 4;
  align-self: end;
  justify-self: center;
  pointer-events: none;
  z-index: 10;
  width: 50%;
  position: relative;
  margin-bottom: -8%;
}

.gemstone-image {
  width: 100%;
  height: auto;
  transition: opacity var(--transition-slow) ease-out;
}

.gemstone-image.gemstone-glow {
  opacity: 0;
}

.gemstone-image-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity var(--transition-slow) ease-out;
}

.gemstone-image-glow.gemstone-glow {
  opacity: 1;
}

/* ===================================
   Game Screen
   =================================== */
#game-screen {
  background-color: #1a1a1a;
}

#game-screen.ending-mode {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Main Game Content Area */
.game-main {
  position: relative;
  width: 100%;
  height: 100%;
}

/* In ending mode, game-main should be full viewport height */
#game-screen.ending-mode .game-main {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===================================
   Prologue
   =================================== */
.prologue-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  cursor: pointer;
}

.prologue-text {
  font-size: 22px;
  color: white;
  text-align: center;
  line-height: 2.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.9), 0 0 30px rgba(0,0,0,0.6);
  max-width: 900px;
  padding: 30px 50px;
  background: none;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image var(--transition-normal);
}

/* ===================================
   Character Container
   =================================== */
.character-container {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: 100%;
  padding: 0;
  pointer-events: none;
  z-index: 5;
  left: 50%;
  transform: translateX(-50%);
}

.character {
  position: relative;
  height: 100%;
  flex: 0 1 auto;
  display: flex;
  align-items: flex-end;
  -webkit-transition: opacity var(--transition-normal) ease-out,
              -webkit-filter 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  -moz-transition: opacity var(--transition-normal) ease-out,
              filter 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  -o-transition: opacity var(--transition-normal) ease-out,
              filter 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  transition: opacity var(--transition-normal) ease-out,
              filter 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.character-img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
  -webkit-transition: opacity var(--transition-normal) ease-out,
              -webkit-filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  -moz-transition: opacity var(--transition-normal) ease-out,
              filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  -o-transition: opacity var(--transition-normal) ease-out,
              filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  transition: opacity var(--transition-normal) ease-out,
              filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.character.speaking {
  opacity: 1;
  -webkit-filter: brightness(1);
  filter: brightness(1);
}

.character.speaking .character-img {
  opacity: 1;
  -webkit-filter: brightness(1);
  filter: brightness(1);
}

.character.silent {
  -webkit-filter: brightness(0.7) saturate(0.7);
  filter: brightness(0.7) saturate(0.7);
}

.character.silent .character-img {
  -webkit-filter: brightness(0.7) saturate(0.7);
  filter: brightness(0.7) saturate(0.7);
}

.character-left {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  margin-left: -5%;
  z-index: 2;
}

.character-left .character-img {
  object-position: bottom left;
}

.character-right {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  margin-right: -5%;
  z-index: 1;
}

.character-right .character-img {
  object-position: bottom right;
}

.character-container.single-character {
  justify-content: center;
}

.character-container.single-character .character-left,
.character-container.single-character .character-right {
  left: 50%;
  transform: translateX(-50%);
  margin-left: 0;
  width: 100%;
  max-width: 800px;
  height: 100%;
  justify-content: center;
}



.character-container.single-character .character-left .character-img {
  object-position: bottom center;
}

/* ===================================
   Character-Specific Adjustments
   個別角色的微調
   =================================== */

.character.char-aster .character-img {
  transform: translateX(-20%);
}

.character.char-garu .character-img {
  transform: translateX(-10%);
}

.character.char-blade .character-img {
  transform: scale(1) translateY(0%);
}

/* .character.char-edmond .character-img {
  transform: translateY(-10%);
} */

.character.char-yakumo .character-img {
  transform: translateY(5%);
}

.character.char-morvay .character-img {
  transform: scale(1.09) translateY(-2%);
}

.character.char-rei .character-img {
  transform: scale(0.95) translateY(2.5%);
}



/* ===================================
   Dialog Box
   =================================== */
.dialog-box {
  position: relative;
  padding: 30px 50px;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  background-image: url('../assets/images/pc/ui/dialogbox.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  order: 2;
  z-index: 10;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease-out;
  -moz-transition: opacity 0.3s ease-out;
  -o-transition: opacity 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}

.dialog-box.dialog-visible {
  opacity: 1;
}
.name-box {
  position: absolute;
  transform: none;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease-out;
  -moz-transition: opacity 0.3s ease-out;
  -o-transition: opacity 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}

.name-box.name-visible {
  opacity: 1;
}

.speaker-name {
  color: white;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Huey 的名字顏色 */
.speaker-name.speaker-huey {
  color: var(--primary-03);
}

.dialog-box .dialog-text {
  color: var(--primary-03);
  position: absolute;
  top: 50%; left: 8%; right: 8%;
  transform: translateY(-50%);
  /* max-height: 70%; */
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dialog-box .dialog-text::-webkit-scrollbar {
  display: none;
}

.btn-next {
  position: absolute;
  bottom: 10%; right: 4%;
  width: 20%;
  max-width: 50px;
  height: auto;
  aspect-ratio: 1;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 0;
  transition: transform var(--transition-fast);
  background-image: none;
}

.btn-next::before,
.btn-next::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
}

.btn-next::before {
  background-image: url('../assets/images/pc/ui/btn_next_nor.png');
  opacity: 1;
}

.btn-next::after {
  background-image: url('../assets/images/pc/ui/btn_next_hov.png');
  opacity: 0;
}

.btn-next:hover::before {
  opacity: 0;
}

.btn-next:hover::after {
  opacity: 1;
}

.btn-next:hover {
  transform: scale(1.1);
}

/* ===================================
   Question Container
   =================================== */
.question-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  height: 60%;
  width: 90%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 25px;
  z-index: 15;
  pointer-events: none;
}

.question-container > * {
  pointer-events: auto;
}

.question-text {
  display: none;
}

.options-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  order: 1;
  opacity: 1;
  -webkit-transition: opacity 0.3s ease-out;
  -moz-transition: opacity 0.3s ease-out;
  -o-transition: opacity 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}

.options-container.fade-out {
  opacity: 0;
}

.btn-option {
  padding: 0 40px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: var(--primary-04);
  text-align: center;
  transition: transform var(--transition-fast), opacity var(--transition-normal) ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  position: relative;
  background-image: none;
}

.btn-option::before,
.btn-option::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
  z-index: -1;
}

.btn-option::before {
  background-image: url('../assets/images/pc/ui/quiz_btn_nor.png');
  opacity: 1;
}

.btn-option::after {
  background-image: url('../assets/images/pc/ui/quiz_btn_hov.png');
  opacity: 0;
}

.btn-option:hover::before,
.btn-option:active::before {
  opacity: 0;
}

.btn-option:hover::after,
.btn-option:active::after {
  opacity: 1;
}

.btn-option:hover,
.btn-option:active {
  transform: scale(1.02);
}

/* Option button fade-out animation */
.btn-option.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* Option button slide-in animation */
.btn-option.option-animate-in {
  opacity: 0;
  -webkit-transform: translateX(-100px);
  -moz-transform: translateX(-100px);
  -ms-transform: translateX(-100px);
  -o-transform: translateX(-100px);
  transform: translateX(-100px);
}

.btn-option.option-animate-in.option-visible {
  opacity: 1;
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -ms-transform: translateX(0);
  -o-transform: translateX(0);
  transform: translateX(0);
  -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -moz-transition: -moz-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -o-transition: -o-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================
   Reveal Button
   =================================== */
.btn-reveal {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  padding: 20px 50px;
  background-image: url('../assets/images/pc/ui/login_btn_nor_l.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--primary-02);
  font-weight: 600;
  min-width: 280px;
  min-height: 70px;
  transition: transform var(--transition-fast);
  z-index: 20;
}

.btn-reveal:hover {
  background-image: url('../assets/images/pc/ui/login_btn_hov_l.png');
  transform: translate(-50%, 50%) scale(1.05);
}

/* ===================================
   Memory Screen
   =================================== */
#memory-screen {
  background-color: #000;
}

.memory-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fff;
}

/* 左右黑色漸層（僅桌面版） */
.memory-gradient-left,
.memory-gradient-right {
  display: none;
}

@media (min-width: 768px) {
  .memory-gradient-left,
  .memory-gradient-right {
    display: block;
    position: absolute;
    top: 0;
    width: 20%;
    height: 100%;
    pointer-events: none;
    z-index: 600;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
  }
  
  .memory-gradient-left.show,
  .memory-gradient-right.show {
    opacity: 0.8;
  }
  
  .memory-gradient-left {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  }
  
  .memory-gradient-right {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  }
}

.memory-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 10;
}

#game-screen .memory-text-overlay {
  z-index: 100;
}

.memory-text-paragraph {
  color: #fff;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  margin: 0;
  white-space: pre-line;
}

.btn-memory-next {
  width: auto;
  min-width: 280px;
  height: auto;
  padding: 18px 40px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: var(--primary-04);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 700;
  text-align: center;
  margin-top: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform var(--transition-fast);
  position: relative;
  background-image: none;
}

.btn-memory-next::before,
.btn-memory-next::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
  z-index: -1;
}

.btn-memory-next::before {
  background-image: url('../assets/images/pc/ui/quiz_btn_nor.png');
  opacity: 1;
}

.btn-memory-next::after {
  background-image: url('../assets/images/pc/ui/quiz_btn_hov.png');
  opacity: 0;
}

.btn-memory-next:hover::before {
  opacity: 0;
}

.btn-memory-next:hover::after {
  opacity: 1;
}

.btn-memory-next.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-memory-next:hover {
  transform: scale(1.05);
}

.memory-text-container {
  display: none;
}

/* Ending Footer Area - shown after memory on game screen */
.ending-footer {
  display: none;
  width: 100%;
  padding: 50px 20px 30px;
  background-color: #1a1a1a;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.ending-footer.visible {
  display: flex;
}

.ending-footer .social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.ending-footer .social-link {
  width: 50px;
  height: 50px;
  opacity: 0.9;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ending-footer .social-link:hover {
  opacity: 1;
  transform: scale(1.1);
}

.ending-footer .social-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: auto;
}

.ending-footer .social-link-app {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
}

.ending-footer .social-link-app img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ending Copyright - Below Footer */
.ending-copyright {
  display: none;
  width: 100%;
  padding: 20px;
  background-color: #1a1a1a;
  text-align: center;
  font-size: 14px;
  color: rgba(184, 173, 149, 0.6);
  letter-spacing: -0.4px;
}

.ending-copyright.visible {
  display: block;
}

.ending-copyright .tm {
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 1px;
}

/* ===================================
   Result Screen
   =================================== */
#result-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #1a1a1a;
  -webkit-overflow-scrolling: touch;
}

/* Main Content Area - Device Full Screen */
.result-main {
  position: relative;
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.result-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/pc/bg/bg_02.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.result-card {
  flex-shrink: 0;
  aspect-ratio: 512 / 855;
}

.result-image-container {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.result-image {
  width: 100%;
  height: auto;
  display: block;
}

/* UID fixed position on card */
.result-uid {
  position: absolute;
  color: #766770;
  /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9); */
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Result Content Layout */
.result-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: min(2vh, 20px);
  box-sizing: border-box;
}

/* Result Container */
.result-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
}

/* Share Area */
.result-share-area {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

/* New Share Button with background image */
.btn-share-new {
  position: relative;
  aspect-ratio: 288 / 179;
  background-image: url('../assets/images/pc/ui/share_btn.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.btn-share-new:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.share-btn-line1 {
  font-size: min(clamp(10px, 0.8vw, 12px), calc(1.2vh));
  color: #fff9f0;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.share-btn-line2 {
  font-size: min(clamp(14px, 1.2vw, 18px), calc(1.8vh));
  color: #fff9f0;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

/* Action Buttons Container (restart & download) */
.result-buttons {
  display: flex;
  justify-content: center;
  gap: min(clamp(20px, 4vw, 40px), 4vh);
  flex-shrink: 0;
}

/* Icon Buttons (restart & download) */
.btn-icon {
  width: min(clamp(50px, 8vw, 70px), calc(7vh));
  height: auto;
  aspect-ratio: 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
  position: relative;
}

.btn-icon::before,
.btn-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
}

.btn-icon::before {
  opacity: 1;
}

.btn-icon::after {
  opacity: 0;
}

.btn-icon:hover::before {
  opacity: 0;
}

.btn-icon:hover::after {
  opacity: 1;
}

.btn-icon:hover {
  transform: scale(1.1);
}

/* Restart Button */
.btn-restart::before {
  background-image: url('../assets/images/pc/ui/undo_nor.png');
}

.btn-restart::after {
  background-image: url('../assets/images/pc/ui/undo_hov.png');
}

/* Download Icon Button */
.btn-download-icon::before {
  background-image: url('../assets/images/pc/ui/download_nor.png');
}

.btn-download-icon::after {
  background-image: url('../assets/images/pc/ui/download_hov.png');
}

/* Disclaimer text */
.result-disclaimer {
  /* margin-top: min(clamp(10px, 1.5vh, 20px), 1.5vh); */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.2;
  width: 100%;
  max-width: 95%;
  flex-shrink: 0;
  white-space: pre-line;
}

/* Footer Area */
.result-footer {
  width: 100%;
  padding: 50px 20px 30px;
  background-color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.result-footer .social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.result-footer .social-link {
  width: 50px;
  height: 50px;
  opacity: 0.9;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-footer .social-link:hover {
  opacity: 1;
  transform: scale(1.1);
}

.result-footer .social-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: auto;
}

.result-footer .social-link-app {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
}

.result-footer .social-link-app img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Copyright - Below Footer */
.result-copyright {
  width: 100%;
  padding: 20px;
  background-color: #1a1a1a;
  text-align: center;
  font-size: 14px;
  color: rgba(184, 173, 149, 0.6);
  letter-spacing: -0.4px;
}

.result-copyright .tm {
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 1px;
}

/* ===================================
   Share Dialog
   =================================== */
.share-dialog-content {
  position: relative;
  width: min(clamp(500px, 40vw, 658px), calc(70vh * 658 / 428));
  aspect-ratio: 658 / 428;
  padding: 0;
  text-align: center;
  background-image: url('../assets/images/pc/ui/share_bg.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: min(clamp(8px, 1vw, 30px), 2vh);
}

.share-dialog-content .share-title {
  font-size: min(clamp(20px, 6vw, 28px), 24vh);
  font-weight: 700;
  color: #FFF;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  letter-spacing: 0.05em;
  margin-top: -3%;
}

.share-dialog-content .share-description {
  font-size: min(clamp(12px, 0.8vw, 16px), 2vh);
  font-weight: 400;
  color: #FFF;
  margin: 0;
  padding: 0 min(clamp(20px, 3vw, 40px), 5vh);
  line-height: 1.6;
  text-align: center;
  max-width: 90%;
}

.share-dialog-content .btn-close {
  position: absolute;
  top: min(clamp(3%, 1vw, 5%), 3vh);
  right: min(clamp(-2%, 1.5vw, -2%), 2.5vh);
  width: min(clamp(44px, 6vw, 69px), 10vh);
  height: min(clamp(44px, 6vw, 69px), 10vh);
  aspect-ratio: 1;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  transition: transform var(--transition-fast);
  background-image: none;
}

.share-dialog-content .btn-close::before,
.share-dialog-content .btn-close::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-normal) ease-out;
}

.share-dialog-content .btn-close::before {
  background-image: url('../assets/images/pc/ui/btn_close_nor.png');
  opacity: 1;
}

.share-dialog-content .btn-close::after {
  background-image: url('../assets/images/pc/ui/btn_close_hov.png');
  opacity: 0;
}

.share-dialog-content .btn-close:hover::before {
  opacity: 0;
}

.share-dialog-content .btn-close:hover::after {
  opacity: 1;
}

.share-dialog-content .btn-close:hover {
  transform: scale(1.05);
}

.share-buttons {
  display: flex;
  gap: min(clamp(15px, 1.5vw, 25px), 2.5vh);
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  width: min(clamp(45px, 4vw, 60px), 8vh);
  height: min(clamp(45px, 4vw, 60px), 8vh);
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* ===================================
   White Flash
   =================================== */
.white-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0;
  pointer-events: none;
  z-index: 500;
}

/* ===================================
   Black Transition Overlay
   =================================== */
.black-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  pointer-events: none;
  z-index: 450;
}

/* ===================================
   Typewriter Effect
   =================================== */
.typewriter-text {
  overflow: hidden;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: currentColor;
  margin-left: 2px;
  -webkit-animation: blink 0.7s infinite;
  animation: blink 0.7s infinite;
  vertical-align: text-bottom;
}

@-webkit-keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ===================================
   Memory Image Transitions
   =================================== */
.memory-image {
  -webkit-transition: opacity 0.4s ease-in-out;
  -moz-transition: opacity 0.4s ease-in-out;
  -o-transition: opacity 0.4s ease-in-out;
  transition: opacity 0.4s ease-in-out;
}

.memory-image.memory-fade-out {
  opacity: 0;
}

.memory-image.memory-fade-in {
  opacity: 1;
}

/* ===================================
   Hidden Canvas
   =================================== */
#download-canvas {
  display: none;
}

/* ===================================
   Mobile Responsive (< 768px)
   =================================== */
@media (max-width: 767px) {
  
  /* Loading Screen - Mobile */
  #loading-screen {
    background-image: url('../assets/images/mobile/bg/m_bg_01.jpg');
  }
  
  .loading-image {
    max-width: 90%;
    max-height: 50vh;
  }
  
  .loading-text {
    font-size: clamp(16px, 5vw, 24px);
    letter-spacing: 1px;
  }
  
  .loading-progress {
    font-size: clamp(10px, 3vw, 16px);
  }
  
  /* Entry Screen - Mobile */
  #entry-screen {
    background-image: url('../assets/images/mobile/bg/m_bg_01.jpg');
  }
  
  .entry-logo {
    width: 90%;
    max-width: none;
  }
  
  .entry-title {
    font-size: clamp(18px, 4.15vw, 50px);
  }
  
  .entry-description {
    font-size: clamp(12px, 4vw, 18px);
    line-height: 1.2;
    font-weight: 700;
    max-width: 80%;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.95);
  }
  
  .btn-start {
    width: 58%;
    max-width: none;
    height: auto;
    aspect-ratio: 700 / 312;
    font-size: clamp(20px, 5.8vw, 32px);
  }
  
  .btn-start::before {
    background-image: url('../assets/images/mobile/ui/m_login_btn_nor_s.png');
  }
  
  .btn-start::after {
    background-image: url('../assets/images/mobile/ui/m_login_btn_hov_s.png');
  }
  
  /* BGM Dialog - Mobile */
  #bgm-dialog {
    background-image: url('../assets/images/mobile/bg/m_bg_01.jpg');
  }
  
  .dialog-content {
    background-image: url('../assets/images/mobile/ui/m_dialog_bg.png');
    width: min(clamp(300px, 70vw, 434px), calc(70vh * 1053 / 888));
    max-width: none;
    aspect-ratio: 1053 / 888;
    padding: 8% 10%;
  }
  
  .bgm-dialog-text {
    font-size: clamp(16px, 3vw, 24px);
    font-weight: 500;
    /* letter-spacing: 0.04em; */
    line-height: 1.4;
  }
  
  .btn-dialog {
    width: min(clamp(60px, 15vw, 98px), calc(25vh * 239 / 110));
    height: auto;
    aspect-ratio: 239 / 110;
    background-size: 100% 100%;
    flex-shrink: 0;
  }
  
  .btn-on::before {
    background-image: url('../assets/images/mobile/ui/m_dialog_button_on_nor.png');
  }
  
  .btn-on::after {
    background-image: url('../assets/images/mobile/ui/m_dialog_button_on_hov.png');
  }
  
  .btn-off::before {
    background-image: url('../assets/images/mobile/ui/m_dialog_button_off_nor.png');
  }
  
  .btn-off::after {
    background-image: url('../assets/images/mobile/ui/m_dialog_button_off_hov.png');
  }
  
  /* Login Screen - Mobile */
  #login-screen {
    background-image: url('../assets/images/mobile/bg/m_bg_02.jpg');
  }
  
  .login-box-wrapper {
    width: min(clamp(300px, 87.3vw, 600px), calc(90vh * 1179 / 2104));
    aspect-ratio: 1179 / 2104;
    max-height: 90vh;
    grid-template-rows: 10% minmax(0, 1fr) 15% auto;
  }
  
  .login-box-bg {
    background-image: url('../assets/images/mobile/ui/m_login.png');
    aspect-ratio: 1179 / 2104;
  }
  
  .login-title-container {
    margin: 15% 6% 5% 6%;
  }
  
  .btn-gemstone-text {
    width: clamp(144px, 60%, 288px);
    height: auto;
    aspect-ratio: 288 / 129;
    font-size: min(clamp(20px, 5vw, 29.47px), 2vh);
    margin-bottom: -10%;
  }
  
  .btn-gemstone-text::before {
    background-image: url('../assets/images/mobile/ui/m_login_btn_nor_s.png');
  }
  
  .btn-gemstone-text::after {
    background-image: url('../assets/images/mobile/ui/m_login_btn_hov_s.png');
  }
  
  .gemstone-image-wrapper {
    width: 70%;
    margin-bottom: -12%;
  }
  
  .uid-input {
    font-size: clamp(14px, 3.5vw, 16px);
    padding: 12px 16px;
  }
  
  .login-title {
    font-size: clamp(18px, 4vw, 24px);
    line-height: 1;
  }
  
  .uid-hint {
    font-size: clamp(11px, 2.5vw, 14px);
    line-height: 1.2;
  }

  .privacy-notice p {
    font-size: clamp(11px, 2.5vw, 14px);
    line-height: clamp(1.5, 2.5vw, 2);
  }

  .privacy-notice h3 {
    font-size: clamp(14px, 3vw, 18px);
  }
  
  /* Prologue - Mobile */
  .prologue-text {
    font-size: clamp(16px, 4.15vw, 24px);
    font-weight: 900;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: white;
    text-shadow: 0 0 15px rgba(0, 0, 0, 1);
  }
  
  /* Character - Mobile */
  .character-container {
    height: 90%;
    width: clamp(
      60%, 
      calc(100% - (700px - 100vh) * (100vw / 500px) * 0.6 + (500px - 100vw) * 0.2), 
      120%
    );

  }

  .character-img {
    width: auto;
    height: 100%;
    max-width: none;
  }

  .character-left {
    left: clamp(-60%, calc(-30% - (500px - 100vw) * 0.2), -30%);
    margin-left: 0;
  }

  .character-right {
    right: clamp(-60%, calc(-30% - (500px - 100vw) * 0.2), -30%);
    margin-right: 0;
  }

  .character-container.single-character .character-left {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: none;
  }
  
  .character-container.single-character .character-left .character-img {
    object-position: bottom center;
    max-width: 130%;
  }
  
  /* Dialog Box - Mobile */
  .dialog-box {
    width: min(clamp(300px, 100vw, 629px), calc(40vh * 1206 / 629));
    aspect-ratio: 1206 / 629;
    padding: 4% 5%;
    background-image: url('../assets/images/mobile/ui/m_dialogbox.png');
  }
  
  .dialog-box .dialog-text {
    font-size: min(clamp(12px, 4.15vw, 20px), 2.3vh);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    max-height: 50%;
  }
  
  .name-box {
    top: -8%;
    left: 8%;
    width: min(clamp(150px, 40vw, 200px), calc(10vh * 487 / 223));
    aspect-ratio: 487/ 223;
    padding: 0 min(clamp(15px, 4vw, 25px), 2.5vh);
  }
  
  .speaker-name {
    font-size: min(clamp(12px, 3.5vw, 16px), 2vh);
  }
  
  .btn-next {
    width: 10%;
    max-width: 50px;
    right: 8%;
  }
  
  .btn-next::before {
    background-image: url('../assets/images/mobile/ui/m_btn_next_nor.png');
  }
  
  .btn-next::after {
    background-image: url('../assets/images/mobile/ui/m_btn_next_hov.png');
  }
  
  /* Question Container - Mobile */
  .question-container {
    width: 95%;
    padding-bottom: clamp(20px, 2%, 30px);
    gap: min(clamp(15px, 3vw, 25px), 3vh);
  }
  
  .options-container {
    width: min(clamp(280px, 90vw, 500px), calc(20vh * 1185 / 377));
    gap: min(clamp(10px, 2vw, 20px), 2vh);
  }
  
  .question-text {
    font-size: min(clamp(12px, 2vw, 16px), 2vh);
  }
  
  .btn-option {
    width: 100%;
    height: auto;
    aspect-ratio: 1185 / 377;
    font-size: min(clamp(12px, 4vw, 16px), 2vh);
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2% 10%;
  }
  
  .btn-option::before {
    background-image: url('../assets/images/mobile/ui/m_btn_nor.png');
  }
  
  .btn-option::after {
    background-image: url('../assets/images/mobile/ui/m_btn_hov.png');
  }
  
  /* Memory Screen - Mobile */
  .memory-text-overlay {
    width: 85%;
    gap: 20px;
  }

  .memory-text-paragraph {
    font-size: clamp(14px, 4vw, 20px);
    line-height: 1.5;
  }

  .btn-memory-next {
    min-width: 240px;
    padding: 14px 30px;
    font-size: clamp(16px, 4vw, 20px);
    margin-top: 10px;
  }

  /* Memory Footer - Mobile */
  /* Ending Footer - Mobile */
  .ending-footer {
    padding: 40px 15px 30px;
    gap: 20px;
  }

  .ending-footer .social-links {
    flex-direction: column;
    gap: 15px;
  }

  .ending-footer .social-link {
    width: 45px;
    height: 45px;
  }

  .ending-footer .social-link-app {
    width: 45px;
    height: 45px;
  }

  .ending-copyright {
    font-size: 11px;
    padding: 15px;
  }
  
  /* Result Screen - Mobile */
  .result-bg {
    background-image: url('../assets/images/mobile/bg/m_bg_02.jpg');
  }

  .result-content {
    justify-content: center;
  }

  .result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
    gap: 4px;
  }

  .result-card {
    width: min(clamp(200px, 85vw, 420px), calc(65vh * 512 / 855));
  }

  .result-uid {
    font-size: min(clamp(5px, 2.5vw, 8px), calc(0.8vh));
    bottom: 6%;
    right: 20%;
  }

  /* Mobile: Buttons below share button */
  .result-buttons {
    display: flex;
  }

  .btn-share-new {
    width: min(clamp(120px, 70vw, 240px), calc(16vh * 288 / 179));
    padding: 0 10% 16% 10%;
  }

  .share-btn-line1 {
    font-size: min(clamp(10px, 3vw, 14px), calc(1.4vh));
  }

  .share-btn-line2 {
    font-size: min(clamp(12px, 3.5vw, 16px), calc(1.4vh));
  }

  html[lang="ja"] .btn-share-new {
    padding: 0 16% 16% 16%;
  }

  html[lang="ja"] .share-btn-line2 {
    font-size: min(clamp(12px, 3.5vw, 16px), calc(1.4vh));
  }

  html[lang="ko"] .btn-share-new {
    padding: 0 16% 12% 16%;
  }

  html[lang="ko"] .share-btn-line2 {
    font-size: min(clamp(14px, 3.5vw, 18px), calc(1.8vh));
  }

  html[lang="en"] .btn-share-new {
    padding: 0 14% 14% 14%;
  }
  html[lang="en"] .share-btn-line2 {
    font-size: min(clamp(14px, 3.5vw, 18px), calc(1.6vh));
  }

  html[lang="zh-TW"] .btn-share-new {
    padding: 0 10% 12% 10%;
  }
  html[lang="zh-TW"] .share-btn-line2 {
    font-size: min(clamp(16px, 3.5vw, 18px), calc(2.4vh));
  }


  .btn-icon {
    width: min(clamp(45px, 12vw, 60px), calc(6vh));
  }

  .result-disclaimer {
    font-size: min(clamp(8px, 2vw, 12px), calc(1.3vh));
    margin-top: min(clamp(8px, 1.5vh, 15px), 1.5vh);
    max-width: 90%;
    bottom: 2vh;
  }

  .result-footer {
    padding: 40px 15px 30px;
    gap: 20px;
  }

  .result-footer .social-links {
    flex-direction: column;
    gap: 15px;
  }

  .result-footer .social-link {
    width: 45px;
    height: 45px;
  }

  .result-footer .social-link-app {
    width: 45px;
    height: 45px;
  }

  .result-copyright {
    font-size: 11px;
    padding: 15px;
  }
  
  /* Share Dialog - Mobile */
  .share-dialog-content {
    width: min(clamp(300px, 85vw, 500px), calc(75vh * 1000 / 739));
    aspect-ratio: 1000 / 739;
    padding: 0;
    background-image: url('../assets/images/mobile/ui/m_share.png');
    gap: min(clamp(8px, 1vw, 25px), 2.5vh);
  }
  
  .share-dialog-content .share-title {
    font-size: min(clamp(18px, 6vw, 28px), 12vh);
  }
  
  .share-dialog-content .share-description {
    font-size: min(clamp(8px, 2vw, 14px), 1.8vh);
    padding: 0 min(clamp(15px, 5vw, 30px), 4vh);
  }
  
  .share-dialog-content .btn-close {
    top: min(clamp(6%, 4vw, 10%), 5vh);
    right: min(clamp(0%, 4vw, -4%), 5vh);
    /* right: 0; */

    width: min(clamp(48px, 9vw, 60px), 15vh);
    height: min(clamp(48px, 9vw, 60px), 15vh);
  }
  
  .share-buttons {
    gap: min(clamp(12px, 3vw, 20px), 2vh);
  }
  
  .share-btn {
    width: min(clamp(32px, 10vw, 44px), 8vh);
    height: min(clamp(32px, 10vw, 44px), 8vh);
  }
  
  /* Global Top Buttons - Mobile */
  .global-top-buttons {
    top: 20px;
    right: 82px;
    gap: 8px;
  }

  .bgm-toggle-btn {
    width: 50px;
    height: 50px;
  }

  /* Global UID Display - Mobile */
  .global-uid-display {
    bottom: 0;
    font-size: 10px;
  }

  /* Menu Button - Mobile */
  .menu-button {
    width: 50px;
    height: 50px;
    border-width: 4px;
    gap: 5px;
  }
  
  .global-menu-btn {
    top: 20px;
    right: 20px;
  }
  
  .menu-icon {
    width: 20px;
    height: 2.5px;
  }
  
  .menu-button.active .menu-icon:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  
  .menu-button.active .menu-icon:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
  
  /* Language Menu - Mobile */
  .language-menu {
    gap: 25px;
  }
  
  .language-buttons {
    gap: 30px;
  }
  
  .btn-lang {
    font-size: 28px;
    letter-spacing: 1px;
  }
  
  /* Copyright - Mobile */
  .copyright {
    font-size: clamp(10px, 2vw, 14px);
    font-weight: 400;
    letter-spacing: -0.017em;
  }
  
  .bgm-copyright {
    font-size: clamp(10px, 2vw, 14px);
    font-weight: 400;
    letter-spacing: -0.017em;
    color: #B8AD95;
  }
  
  .game-copyright {
    font-size: clamp(8px, 1.6vw, 12px);
  }
}

/* ===================================
   Desktop Responsive (>= 768px)
   =================================== */
@media (min-width: 768px) {
  
  /* Entry Screen - Desktop */
  .entry-content {
    max-width: 50vw;
  }
  
  .entry-title {
    font-size: clamp(24px, 2.5vw, 36px);
  }
  
  .entry-description {
    font-size: clamp(18px, 1.25vw, 20px);
    line-height: 1.4;
    font-weight: 700;
  }
  
  .btn-start {
    width: clamp(200px, 15vw, 288px);
    height: auto;
    aspect-ratio: 288 / 129;
    font-size: clamp(20px, 1.53vw, 29.47px);
  }
  
  /* BGM Dialog - Desktop */
  .bgm-dialog-text {
    font-size: min(clamp(18px, 2.5vw, 20px), 6vh);
    font-weight: 500;
    line-height: 1.3;
  }
  
  /* Login Screen - Desktop */
  .login-box-wrapper {
    width: min(clamp(440px, 60vw, 550px), calc(90vh * 600 / 888));
    aspect-ratio: 600 / 888;
    max-height: 90vh;
  }
  
  .btn-gemstone-text {
    padding: 0 6%;
    width: clamp(144px, 60%, 288px);
    height: auto;
    aspect-ratio: 288 / 129;
    font-size: min(clamp(16px, 1.2vw, 18px), 2.3vh);
    margin-bottom: -10%;
  }
  
  .uid-input {
    font-size: 16px;
    padding: 14px 20px;
  }
  
  .login-title {
    font-size: min(clamp(22px, 2.5vw, 26px), 10vh);
  }
  
  .uid-hint,
  .privacy-notice h3,
  .privacy-notice p {
    font-size: 13px;
  }
  
  /* Character Container - Desktop */
  .character-container {
    height: 90%;
    width: min(clamp(960px, 80vw, 1280px), calc(30vh * 1280 / 216));  }
  
  /* Dialog Box - Desktop */
  .dialog-box {
    width: min(clamp(600px, 80vw, 960px), calc(30vh * 960 / 216));
    aspect-ratio: 928 / 303;
    padding: 2% 4%;
  }
  
  .dialog-box .dialog-text {
    font-size: min(clamp(16px, 1.25vw, 24px), 3vh);
    font-weight: 900;
    line-height: 1.42;
  }
  
  .name-box {
    top: min(clamp(-25px, -1.3vw, -20px), -2.5vh);
    left: min(clamp(25px, 1.56vw, 30px), 3vh);
    width: min(clamp(180px, 20vw, 281px), calc(10vh * 281 / 108));
    aspect-ratio: 281 / 108;
    padding: 0 min(clamp(20px, 1.56vw, 30px), 3vh);
  }
  
  .speaker-name {
    font-size: min(clamp(14px, 2vw, 20px), 2.5vh);
  }
  
  /* Question Container - Desktop */
  .question-container {
    padding-bottom: clamp(20px, 2%, 30px);
    gap: min(clamp(15px, 1.5vw, 25px), 2vh);
  }
  
  .options-container {
    width: min(clamp(500px, 38vw, 737px), calc(15vh * 737 / 135));
    gap: min(clamp(4px, 1.5vw, 12px), 1vh);
  }
  
  .btn-option {
    width: 100%;
    height: auto;
    aspect-ratio: 737 / 135;
    font-size: min(clamp(16px, 1.04vw, 20px), 2.5vh);
    font-weight: 500;
  }
  
  /* Global Top Buttons - Desktop */
  .global-top-buttons {
    top: 30px;
    right: 102px;
    gap: 12px;
  }

  .bgm-toggle-btn {
    width: 60px;
    height: 60px;
  }

  /* Menu Button - Desktop */
  .menu-button {
    width: 60px;
    height: 60px;
    border-width: 4px;
    gap: 6px;
  }
  
  .global-menu-btn {
    top: 30px;
    right: 30px;
  }
  
  .menu-icon {
    width: 24px;
    height: 3px;
  }

  /* Memory Screen - Desktop */
  .memory-text-overlay {
    max-width: 1000px;
    gap: 40px;
  }

  .memory-text-paragraph {
    font-size: clamp(20px, 1.5vw, 28px);
    line-height: 1.7;
  }

  .btn-memory-next {
    min-width: 320px;
    padding: 20px 50px;
    font-size: clamp(20px, 1.5vw, 26px);
    margin-top: 20px;
  }

  /* Result Screen - Desktop */
  .result-bg {
    background-image: url('../assets/images/pc/bg/bg_02.jpg');
  }

  .result-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .result-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
  }

  .result-card {
    width: min(clamp(400px, 35vw, 480px), calc(70vh * 512 / 855));
  }

  .result-uid {
    font-size: min(clamp(8px, 0.6vw, 10px), calc(1vh));
    right: 21%;
    bottom: 6%;
  }

  .result-buttons {
    position: absolute;
    right: min(clamp(-40px, -4vw, -50px), -5vh);
    top: 35%;
    flex-direction: column;
    gap: min(clamp(20px, 2vw, 30px), 3vh);
  }

  .btn-share-new {
    width: min(clamp(160px, 26vw, 288px), calc(16vh * 288 / 179));
    padding: 0 14% 14% 14%;
  }

  .share-btn-line1 {
    font-size: min(clamp(12px, 0.85vw, 14px), calc(2vh));
  }

  .share-btn-line2 {
    font-size: min(clamp(16px, 1.2vw, 20px), calc(2.4vh));
    line-height: 1;
  }

  html[lang="ja"] .btn-share-new {
    padding: 0 14% 8% 14%;
  }

  html[lang="en"] .btn-share-new {
    padding: 0 14% 8% 14%;
  }
  
  html[lang="zh-TW"] .btn-share-new {
    padding: 0 14% 13% 14%;
  }

  html[lang="zh-TW"] .share-btn-line2 {
    font-size: min(clamp(16px, 1.6vw, 20px), calc(2.4vh));
  }

  html[lang="ko"] .btn-share-new {
    padding: 0 10% 13% 10%;
  }

  html[lang="ko"] .share-btn-line2 {
    font-size: min(clamp(16px, 1.6vw, 20px), calc(2vh));
  }


  .btn-icon {
    width: min(clamp(60px, 5vw, 80px), calc(7vh));
  }

  .result-disclaimer {
    font-size: min(clamp(12px, 0.9vw, 16px), calc(1.6vh));
    margin-top: min(clamp(15px, 2vh, 25px), 2vh);
    bottom: 2.5vh;
  }

  .result-footer {
    padding: 50px 30px;
  }

  .result-footer .social-links {
    gap: 18px;
  }

  .result-footer .social-link {
    width: 50px;
    height: 50px;
  }

  .result-footer .social-link-app {
    height: 50px;
  }

  .result-footer .copyright {
    font-size: 16px;
  }
}
