:root {
  --mm-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Noto Sans Thai", sans-serif;
}

html body,
html button,
html input,
html select,
html textarea {
  font-family: var(--mm-font-family) !important;
}

html[data-mm-density="compact"] .feature-shortcut-card { padding: 8px; border-radius: 18px; }
html[data-mm-density="compact"] .feature-shortcut-copy { padding: 8px 1px 1px; }
html[data-mm-density="compact"] .toolbar { padding: 10px 12px; }
html[data-mm-density="compact"] .collection-grid { gap: 13px; }
html[data-mm-density="compact"] .movie-card { height: 390px; }
html[data-mm-density="compact"] .card-content { padding: 15px 14px 13px; }
html[data-mm-density="compact"] .dashboard-stat,
html[data-mm-density="compact"] .dashboard-panel,
html[data-mm-density="compact"] .guide-card,
html[data-mm-density="compact"] .tutorial-card { padding-block: 15px; }

html[data-mm-motion="reduced"] *,
html[data-mm-motion="reduced"] *::before,
html[data-mm-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-mm-motion="system"] *,
  html[data-mm-motion="system"] *::before,
  html[data-mm-motion="system"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 560px) {
  html[data-mm-density="compact"] .movie-card { height: 315px; }
  html[data-mm-density="compact"] .feature-shortcut-card { min-height: 188px; }
}

body.mm-auth-waiting {
  overflow: hidden !important;
}

.mm-auth-feedback[hidden] {
  display: none !important;
}

.mm-auth-feedback {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--gold, #ff9f0a) 18%, transparent), transparent 34rem),
    rgba(0, 0, 0, .78);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  opacity: 1;
  transition: opacity .18s ease;
}

.mm-auth-feedback.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.mm-auth-feedback-card {
  box-sizing: border-box;
  width: min(430px, 100%);
  padding: 30px 28px 25px;
  overflow: hidden;
  position: relative;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(34, 34, 36, .97), rgba(19, 19, 21, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 30px 90px rgba(0, 0, 0, .58);
  animation: mm-auth-card-in .32s cubic-bezier(.2, .8, .2, 1) both;
}

.mm-auth-feedback-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.mm-auth-feedback-brand > img,
.mm-auth-google-mark {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .28);
}

.mm-auth-feedback-brand > img {
  display: block;
  object-fit: cover;
}

.mm-auth-google-mark {
  display: grid;
  place-items: center;
  margin-left: -8px;
  transform: translate(26px, 25px) scale(.66);
  background: #fff;
}

.mm-auth-google-mark svg {
  width: 29px;
  height: 29px;
}

.mm-auth-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 17px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 10deg, transparent 12%, var(--gold, #ff9f0a));
  animation: mm-auth-spin .8s linear infinite;
}

.mm-auth-spinner i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #1d1d1f;
}

.mm-auth-feedback.is-error .mm-auth-spinner {
  animation: none;
  background: #ff453a;
  position: relative;
}

.mm-auth-feedback.is-error .mm-auth-spinner::before,
.mm-auth-feedback.is-error .mm-auth-spinner::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 8px;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
  transform: rotate(45deg);
}

.mm-auth-feedback.is-error .mm-auth-spinner::after {
  transform: rotate(-45deg);
}

.mm-auth-feedback h2 {
  margin: 0;
  color: #f5f5f7;
  font: 700 clamp(22px, 5vw, 27px)/1.2 var(--mm-font-family);
  letter-spacing: -.035em;
}

.mm-auth-feedback-copy {
  max-width: 330px;
  margin: 9px auto 0;
  color: #a1a1a6;
  font-size: 14px;
  line-height: 1.6;
}

.mm-auth-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 25px 0 0;
}

.mm-auth-progress > span {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  color: #636366;
}

.mm-auth-progress > span:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 5px;
  left: calc(50% + 8px);
  width: calc(100% - 16px);
  height: 2px;
  background: #3a3a3c;
}

.mm-auth-progress > span.is-active:not(:last-child)::after {
  background: color-mix(in srgb, var(--gold, #ff9f0a) 70%, #3a3a3c);
}

.mm-auth-progress i {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 2px solid #48484a;
  border-radius: 50%;
  background: #1c1c1e;
}

.mm-auth-progress .is-active {
  color: #d1d1d6;
}

.mm-auth-progress .is-active i {
  border-color: var(--gold, #ff9f0a);
  background: var(--gold, #ff9f0a);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold, #ff9f0a) 14%, transparent);
}

.mm-auth-progress small {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-auth-slow-note {
  margin: 20px 0 0;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  color: #c7c7cc;
  font-size: 12px;
  line-height: 1.55;
}

.mm-auth-feedback-close {
  min-width: 150px;
  min-height: 42px;
  margin-top: 14px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #f5f5f7;
  font: 600 13px var(--mm-font-family);
  cursor: pointer;
}

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

@keyframes mm-auth-card-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .mm-auth-feedback {
    place-items: end center;
    padding-inline: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .mm-auth-feedback-card {
    width: 100%;
    padding: 27px 22px max(23px, calc(17px + env(safe-area-inset-bottom)));
    border-radius: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-auth-feedback-card {
    animation: none;
  }
}
