/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-weight: 650;
  font-size: 1rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: var(--accent-text);
  box-shadow: 0 10px 28px rgba(196, 160, 53, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 32px rgba(196, 160, 53, 0.45);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* Brand chip */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.brand-mark__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(232, 200, 90, 0.25);
}

/* Progress dots */
.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.3s var(--ease-out), background 0.3s;
}

.dots span.is-on {
  width: 22px;
  border-radius: 4px;
  background: var(--gold-bright);
}

/* Bottom nav — 아이콘 바로 아래 여백을 최소화 */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  min-height: calc(var(--nav-h) + var(--safe-bottom-gap));
  height: auto;
  padding: 6px 4px var(--tabbar-pad-bottom);
  background: rgba(245, 247, 249, 0.97);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(20, 24, 31, 0.08);
  box-shadow: 0 -6px 20px rgba(20, 24, 31, 0.06);
  box-sizing: border-box;
}

.tabbar--fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  z-index: 60;
}

.tabbar--fixed.is-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.tabbar__glow {
  position: absolute;
  top: 0;
  left: 12.5%;
  width: 25%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.tabbar[data-active="home"] .tabbar__glow { left: 0%; }
.tabbar[data-active="map"] .tabbar__glow { left: 25%; }
.tabbar[data-active="book"] .tabbar__glow { left: 50%; }
.tabbar[data-active="ar"] .tabbar__glow { left: 75%; }

.tabbar button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 2px 2px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--stone);
  opacity: 0.55;
  transition: opacity 0.2s, color 0.2s, transform 0.2s;
}

.tabbar button:active {
  transform: scale(0.92);
}

.tabbar button.is-active {
  opacity: 1;
  color: var(--ink);
}

.tabbar button.is-active .tabbar__ico {
  animation: tabPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tabPop {
  0% { transform: scale(0.7); }
  100% { transform: scale(1); }
}

.tabbar__ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  transition: background 0.2s, box-shadow 0.2s;
}

.tabbar button.is-active .tabbar__ico {
  background: rgba(196, 160, 53, 0.16);
  box-shadow: 0 0 0 1px rgba(196, 160, 53, 0.2);
}

.tabbar button svg {
  width: 22px;
  height: 22px;
}

.tabbar button.is-locked {
  position: relative;
}

.tabbar button.is-locked::after {
  content: "2단계";
  position: absolute;
  top: 2px;
  right: 10px;
  font-size: 0.55rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  opacity: 0.7;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom-gap));
  transform: translateX(-50%) translateY(20px);
  z-index: 100;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.35s var(--ease-out);
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 431px) {
  .toast {
    bottom: calc(96px + 24px + var(--safe-bottom-gap));
  }

  .tabbar--fixed {
    bottom: 24px;
    border-radius: 0 0 28px 28px;
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 430px;
    transform: translateX(-50%);
  }
}
