/* Front-end */

.sammc-wrap {
  position: relative;
  --sammc-w: 440px;
  --sammc-h: 660px;
  width: min(100%, var(--sammc-w));
  margin: 0 auto;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.sammc-tabs {
  position: absolute;
  width: 200px;
  height: 90px;
  z-index: 50;

  display: flex;
  gap: 6px;


  /* top: 560px; */
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: url('img/tap_btn_bg.svg') no-repeat center / contain;

}

.sammc-wrap button.sammc-tab {
  padding: 0;
  min-height: 0;
  line-height: 1;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
}

.sammc-tab {
  width: 40px;
  height: 60px;
  border: none;
  background: no-repeat center/contain;
  font-size: 0;
  flex: 0 0 40px;
  justify-content: flex-start;
  /* 텍스트 숨김 */
  cursor: pointer;
}

/* 앞면 */
.sammc-tab[data-tab="front"] {
  background-image: url('img/flip_f_btn_1p.svg');
}

.sammc-tab[data-tab="front"]:hover {
  background-image: url('img/flip_f_btn_o_1p.svg');
}

/* 뒷면 */
.sammc-tab[data-tab="back"] {
  background-image: url('img/flip_b_btn_1p.svg');
}

.sammc-tab[data-tab="back"]:hover {
  background-image: url('img/flip_b_btn_o_1p.svg');
}

/* YAP */
/* yap 버튼만 오른쪽 끝으로 */
.sammc-tab[data-tab="yap"] {
  margin-left: auto;
  background-image: url('img/tap_btn_1p.svg');
}

.sammc-tab[data-tab="yap"]:hover {
  background-image: url('img/tap_btn_o_1p.svg');
}

.sammc-tab.is-active[data-tab="front"] {
  background-image: url('img/flip_f_btn_o_1p.svg');
}

.sammc-tab.is-active[data-tab="back"] {
  background-image: url('img/flip_b_btn_o_1p.svg');
}

.sammc-tab.is-active[data-tab="yap"] {
  background-image: url('img/tap_btn_o_1p.svg');
}



.sammc-tab.is-active {
  border-color: rgba(0, 0, 0, .35);
  background: rgba(0, 0, 0, .04);
  background: no-repeat center/contain;
}

.sammc-card {
  position: relative;
  z-index: 1;
  width: min(100%, var(--sammc-w));
  height: auto;
  outline: none;
}

.sammc-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: var(--sammc-h);
  transform-style: preserve-3d;
  transition: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  background: #ffffff;
}

.sammc-face {
  position: absolute;
  inset: 0;
  z-index: 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

/*
.sammc-back {}
*/

.sammc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sammc-missing {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .08) 10px, rgba(255, 255, 255, .03) 10px, rgba(255, 255, 255, .03) 20px);
}

.sammc-yap {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  pointer-events: auto;
}

.sammc-yap-hidden {
  display: none;
}

.sammc-yap-inner {
  width: 100%;
  height: 100%;
}

.sammc-help {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: rgba(0, 0, 0, .6);
}

/* Actions */
.sammc-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.sammc-send-to-me {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  color: rgba(0, 0, 0, .85);
}

.sammc-send-to-me:hover {
  border-color: rgba(0, 0, 0, .25);
}

/* For HTML game iframe */
.sammc-yap-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

/* Orientation */
.sammc-orient-landscape .sammc-stage {
  aspect-ratio: 3 / 2;
}

/* Face visibility (fake flip: swap at halfway) */
.sammc-show-front .sammc-front {
  display: block;
}

.sammc-show-front .sammc-back {
  display: none;
}

.sammc-show-back .sammc-front {
  display: none;
}

.sammc-show-back .sammc-back {
  display: block;
}

/* Hide tabs option */
.sammc-tabs-hidden .sammc-tabs {
  display: none;
}

/* =========================
   Send To Me modal (popup)
========================= */
#sammc-ledger-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

#sammc-ledger-modal.is-open {
  display: block;
}

#sammc-ledger-modal .sammc-ledger-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

#sammc-ledger-modal .sammc-ledger-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 24px));
  background: #0b0b0d;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

#sammc-ledger-modal .sammc-ledger-x {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(20, 20, 23, .9);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

#sammc-ledger-modal .sammc-ledger-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Saved state */
.sammc-send-to-me.is-sent {
  opacity: .55;
  pointer-events: auto;
}

.sammc-send-to-me.is-sent::after {
  content: " ✓";
}


/* Ledger logout (this browser) */

button#sammc-ledger-logout-fab,
button.sammc-ledger-logout-fab {
  all: unset;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999999;

  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #111;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

button#sammc-ledger-logout-fab:hover,
button.sammc-ledger-logout-fab:hover {
  background: #f6f6f6;
  color: #FDB63E;
}

.sammc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.sammc-send-to-me,
.sammc-read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none !important;
  border: 1px solid #d7d7d7;
  background: #fff;
  color: #111;
  font-weight: 600;
  line-height: 1;
}

.sammc-send-to-me:hover,
.sammc-read-more:hover {
  background: #f6f6f6;
}